Next.js Discord

Discord Forum

Nextjs api routes and serverSide logic

Unanswered
Woodwasp posted this in #help-forum
Open in Discord
WoodwaspOP
Hey everyone. I wanted to build and package my nextjs project as an electron app but the problem is that /api routes and serverSide logic wont work since electron serves static pages. Any work around, comment or suggestion is appreciated 🙂

6 Replies

Multiflora rose seed chalcid
Do you have output: 'standalone' in your next.config.js?

Have you tried this?
https://github.com/spa5k/nextjs_approuter_electron
WoodwaspOP
i have checked this before but the thing is it doesn't solve the issue.
@Woodwasp i haven't, let me check this. but i have pages router
Multiflora rose seed chalcid
Hi, any news here? Could you go forward with this?
@Multiflora rose seed chalcid Hi, any news here? Could you go forward with this?
WoodwaspOP
thanks for the help but it doesn't work and it was specifically made for app router