Rush StackShopBlogEvents
Skip to main content

node-service.json

File path:<project folder>/config/node-service.json
Riggable?Yes
Associated plugin:Node.js service plugin

Template

/**
* Configures "heft start" to launch a shell command such as a Node.js service.
* Heft will watch for changes and restart the service process whenever it gets rebuilt.
*/
{
"$schema": "https://developer.microsoft.com/json-schemas/heft/v0/node-service.schema.json"

/**
* Optionally specifies another JSON config file that this file extends from. This provides a way for standard
* settings to be shared across multiple projects.
*/
// "extends": "base-project/config/serve-command.json",

/**
* Specifies the name of a "scripts" command from the project's package.json file.
* When "heft start" is invoked, it will use this shell command to launch the
* service process.
*
* Default value: "serve"
*/
// "commandName": "serve",

/**
* If false, then an error is reported if the "scripts" command is not found in the
* project's package.json. If true, then no action will be taken.
*
* Default value: false
*/
// "ignoreMissingScript": false,

/**
* Customizes the number of milliseconds to wait before restarting the child process,
* as measured from when the previous process exited. If this interval is too small, then
* the new process may start while the developer is still saving changes, or while
* other monitoring processes are still holding OS locks.
*
* Default value: 2000
*/
// "waitBeforeRestartMs": 2000,

/**
* Customizes the number of milliseconds to wait for the child process to be terminated (SIGTERM)
* before forcibly killing it.
*
* Default value: 2000
*/
// "waitForTerminateMs": 2000,

/**
* Customizes the number of milliseconds to wait for the child process to be killed (SIGKILL)
* before giving up and abandoning it.
*
* Default value: 2000
*/
// "waitForKillMs": 2000
}

See also