@dotcom-tool-kit/node
v4.2.2
Published
Run your Node application.
Downloads
2,277
Readme
@dotcom-tool-kit/node
Run your Node application.
This plugin will be installed as a dependency of the frontend-app, backend-heroku-app plugins so you do not need to install it separately if you are using either of those plugins.
Installation
Install @dotcom-tool-kit/node
as a devDependency
in your app:
npm install --save-dev @dotcom-tool-kit/node
Add the plugin to your Tool Kit configuration:
plugins:
- '@dotcom-tool-kit/node'
Tasks
Node
Run a Node.js application for local development.
Task options
| Property | Description | Type | Default |
| :----------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------- | :------------------ |
| entry
| path to the node application | string
| './server/app.js'
|
| args
| additional arguments to pass to your application | Array<string>
| |
| useDoppler
| whether to run the application with environment variables from Doppler | boolean
| true
|
| ports
| ports to try to bind to for this application. set to false
for an entry point that wouldn't bind to a port, such as a worker process or one-off script. | Array<number> \| false
| [3001,3002,3003]
|
| watch
| run Node in watch mode, which restarts your application when the entrypoint or any imported files are changed. nb this option is experimental in versions of Node before v20.13. | boolean
| |
All properties are optional.