@dotcom-tool-kit/node
v5.1.0
Published
Run your Node application.
Readme
@dotcom-tool-kit/node
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.
Installation
Install @dotcom-tool-kit/node as a devDependency in your app:
npm install --save-dev @dotcom-tool-kit/nodeAdd 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] |
| 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.
