2

I'm looking for a documentation which describes the standard way of setting up a Node.js server. I'm wondering whether there is such a thing, actually.

I'm writing a Linux (Ubuntu) server and administrators of a standard server would find it normal to find the settings of the application under:

# Admin editable settings
/etc/<app-name>/<app-name>.conf

# Read-only files used by the server
/usr/lib/<app-name>/...

# Read-Write files used by the server
/var/lib/<app-name>/...

The <app-name>.conf file could be used to change the other paths.

Does the default Linux organization sound completely out of wack for a Node.js application?


IMPORTANT: I'm not in any way interested about how to read the .conf or what format it should be in. That part already works exactly as I want it to work. I'm only interested in where those files are expected to be installed when someone installs your Node.js service.

Alexis Wilke
  • 19,179
  • 10
  • 84
  • 156
  • 1
    My 2 cents: when I see such a structure, _generally_ Node is... behind nginx. Node's configuration is _generally_ maintained by developers, whereas nginx (or other) is maintained by administrators. Which, by the way, leads to home-brew deployment solutions involving environment variables, extra layers like Docker and Puppet, loads of Bash scripts scattered across the server... whatever the two parties settle for. Well, anyway this has been _my_ "generally". Hence an interesting question! – Stock Overflaw Feb 03 '19 at 05:41
  • @StockOverflaw Yeah, I was also thinking that I could create a Debian package which installs all the necessary dependencies such as node, npm, etc. and of course those configuration files. Thus I'd have scripts, but nothing for the end user to do outside of setting up his database and giving the service the necessary info and eventually change the service port. – Alexis Wilke Feb 03 '19 at 07:39

0 Answers0