DPDK Architecture  ->  Bootstrap (v3.0.5)

CLI
>= v1.3.8

The CLI can be used to for example run one-time only commands or run cronjobs.
If the bootstrap detects that an extra command line argument is given the CLI mode will start.

node server.js superAwesomeCommand

New CLI tasks can be created in the tasks folder that can be found in your app folder.
After you import/add your task in the index.js file you are able to run you task.

Extend Completed Callback
>= v1.3.8

It can happen that you need to extend the completed callback. No problem! With this code you can extend the default completed(); callback:

const NextBootstrap = require('@dpdk/bootstrap');
const bootstrap = new NextBootstrap(__dirname, process.cwd(), nextConfig);

bootstrap.cliCompleted = () => {
    // Custom code here
};

bootstrap.init();

Max Execution Timeout
>= v1.4.14

To make sure your CLI task won't be running forever the bootstrap protects itself from running longer then 30 seconds.
This timing can be changed by updating the application config:

{
  "cli": {
    "maxExecutionTimeout": 30
  }
}
Last modifiedFriday, April 30, 2021, 12:00:21 PM UTC
Last authorColin van Eenige
Commit ID4c7a701