User Tools

Site Tools


nodejs:differences-dev-prod

Differences between NodeJS development and production modes

N99panel offers two modes for App deployment - development and production . Here we point out the differences between the two modes so that a user can easily deploy their app - initially in development mode and then later in production mode.

Development Mode Production Mode
App TriggerThe user triggers the app via SSHThe system triggers the app as per the config settings
App StabilityThe app will only run for as long SSH session or the process is running (if placed in background using &). Still the process is unpredictable.

System or SSHD restart will stop the app
It is highly stable.

Even after system restart the App would also start
Environment VariablesTypically the environment variables pertaining to node etc. would be applicable as per SSH environmentEnvironment variables file can be specified while configuring the App
Resource ReferencesIf a user is starting the App from the App's folder, all references within the code etc. would be relative to that folder.Relative references to resources will not work. Absolute or full path of resources needs to be specified.

Here we advise that you design your app in such a way, that the absolute path is specified only once in the environment variable file, and the same can then be referred for creating assets/resources paths.
nodejs/differences-dev-prod.txt · Last modified: 2024/04/07 03:39 by kirtisingh

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki