Skip to main content

Node.js

Running servers or scripts in the background is a common use case for Gaucho. If you are running a Node.js server:

tip

Remember to update your task path.

Run project#

This tasks assumes your package.json is configured with a "start" script.

name
Run server
command
npm start
path
~/my-project

Using yarn#

Alternatively, you can use yarn

name
Run server
command
npm start
path
~/my-project

Running a Node.js script#

If you don't have a package.json configured and just want to run a plain Node.js script:

name
Run script.js
command
node script.js
path
~/my-project

Running tests#

If you have tests configured in your project (using package.json):

name
Run tests
command
npm test
path
~/my-project