NodeJS Builds

The NodeJS buildpack detects if your build is Node by looking for a package.json file. If found, the build will execute the following NPM (or Yarn) commands.

If no Procfile is found, a web process will be started with npm start .

You can customize the node version using the engines field of your package.json. For example

Sample Node Procfile

Railway uses Procfiles to determine the start command of your application. For NodeJS, it's usually best practice to serve a compiled version of your application and serve the distribution via a start command defined in your package.json

Edit this file on GitHub