Dprime Hosting

Deploy a Node.js application in Enhance

Prepare the application, configure its runtime and keep secrets, builds and process behavior production-safe.

Prepare the application

  • Commit a package-lock.json or another supported lock file so production installs are repeatable.
  • Define a production start command and make the application listen on the port supplied by the hosting environment.
  • Keep secrets in environment variables and exclude local .env files from source control.
  • Write logs to standard output or an application log location that will not grow without control.

Deploy the files and runtime

  1. Create the website in Enhance and select the available Node.js application type or runtime.
  2. Upload or pull the application files into the assigned application directory.
  3. Choose the supported Node.js version required by the project.
  4. Add production environment variables in the panel rather than embedding them in client-side code.
  5. Install dependencies and run the production build command if the framework needs one.
  6. Set the start file or command, start the application and inspect the runtime log.

If the application will not start

  • Confirm the selected Node.js version satisfies package requirements.
  • Check that the production dependency install completed without post-install or native-module errors.
  • Confirm the application listens on the environment port and not only on localhost with a fixed port.
  • Check file-name capitalization because Linux paths are case-sensitive.
  • Inspect the first error in the log rather than repeatedly restarting the process.

Official references

Platforms and tools change over time. Use these official references for the current product documentation.

Need help with this?

Tell us the affected domain, what you expected and the exact message you see.

Contact support