Happydevdays Happydevdays - 1 year ago 103
Javascript Question

node.js web app - how to make it available for use

I have a bit of a remedial question about my first node.js web app..
This is the way I invoke my app:

me@mydevbox:/var/www/html/node/inventory$ node app.js
model schema defined
successfully exported database schema
inside locations routing file
Listening on port 3030
connection successful

and then I use my browser to test it / run it etc.

If I now want to publish this app as a consumable resource for the rest of my team, how / what do I have to do to automate the process so that my app is always running?
Sorry, I'm also fair new to sys admin stuff so any tips would be appreciated.

Answer Source

There is an npm package called forever that is used to achieve what you want.

See: https://www.npmjs.com/package/forever


A simple CLI tool for ensuring that a given node script runs continuously (i.e. forever)

This question is also related to yours: Node.js as a background service

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download