Run your Node application.
Run your Node application.
This plugin will be installed as a dependency of the containerised-app-with-assets, containerised-app plugins so you do not need to install it separately if you are using either of those plugins.
Install @dotcom-tool-kit/node as a devDependency in your app:
``sh`
npm install --save-dev @dotcom-tool-kit/node
Add the plugin to your Tool Kit configuration:
`yaml`
plugins:
- '@dotcom-tool-kit/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 | |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 | [3001,3002,3003] |portTimeout
| | how long (in milliseconds) to wait for the app to listen on its port for before exiting. if 0 (the default), will wait forever. | number | 0 |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._