Replies: 1 comment
-
Can you try using the startup-directory: arguments: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Ohhh the irony.
Non-Sucking Service Manager on Windows....none the less I am stuck with the client's environment.
So we have a next.js application that we run on windows 10 no problem with a script file.
npm start
This works fine except you manually have to kick the script off. I know you could put it in the startup group or other work arounds but what we would like best is for it to run as a service.
So node on windows doesn't register as a service thus you have to use this other utility NSSM that "turns" it into a registered service.
I can find numerous examples on how to run node on windows as a service using NSSM like this one.
However all these examples expect there to be a server.js As far as I can tell with next.js you have to implement a custom server to get any sort of a startup file.
I have tried variations like this
to pass start parameters to node but nothing seems to be working.
I'll do the custom server to achieve a startup file but just wanted to get feedback from all you super smart people before doing so. Is there a way to pass startup parameters or an equivalent for next to the server.js? I have to run on windows but any other ideas to achieve a service like experience would be welcome as well.
Beta Was this translation helpful? Give feedback.
All reactions