Hi, I am currently trying to split up

Hi, I am currently trying to split up the routes of my playwrightrouter into seperate files. But how do i do this? File1: export const router = createPlaywrightRouter(); File2: router.addHandler does not do the job for me. I guess the reason is that File2 never gets excuted.
1 Reply
eastern-cyan
eastern-cyan13mo ago
see https://docs.apify.com/academy/web-scraping-for-beginners/challenge/scraping-amazon you need to import { router } from './routes.js'; and make sure that your code reached and executed

Did you find this page helpful?