Hello,

I wanna start a cloudflare worker in typescript. I have to manage 2 Nextjs application on the same domain. In local environment, the first one is on http://localhost:3000 and the second one is listening on http://localhost:3001 I want to create a worker with wrangler in order to catch and proxified some specifics requests in order to go to the first nextjs app or the another one. There is an example: if I go to http://localhost:3001/toto -> I want to stay on http://localhost3001/toto if I go now to http://localhost:3001/restaurants -> I want to go to http://localhost3000/restaurants Or lastly for example, if I go to http://localhost:3000/hotels, I want this time go the other app, on http://localhost:3001/hotels I tried to use the officiel example in the documentation but it's not working. Someone can help me to write the typescript worker ? My second very important question is: Where i have to install the wrangler and the worker, separtly from both apps, or I have to install it on one of the app, by default wrangler is listening on http://localhost:8787 Thanks for helping me
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?