On 2023/09/27 22:14, Remi L. wrote:
> I am an OpenBSD user and I recently installed Node.js. I managed to create
> an rc.d script to start a basic Node.js application, but it only starts
> manually.
> 
> At OpenBSD boot, I can see that the application is started, but it doesn't
> work.

FWIW I have express-based node applications running with scripts like
this:

-----
#!/bin/ksh

daemon="/usr/local/bin/node"
daemon_flags="/home/someuser/node_modules/node-mjpeg-proxy/west/express-app.js"
daemon_user="someuser"

. /etc/rc.d/rc.subr

rc_bg=YES

rc_cmd $1
-----

N.B. if you run as a non-root user you won't be able to bind to port 80

Reply via email to