UNPKG

actionhero

Version:

The reusable, scalable, and quick node.js API server for stateless and stateful applications

16 lines (15 loc) 520 B
#!/usr/bin/env node // load any custom code, configure the env, as needed async function main() { // create a new actionhero process const { Process } = await Promise.resolve().then(() => require("./index")); const app = new Process(); // handle unix signals and uncaught exceptions & rejections app.registerProcessSignals((exitCode) => { process.exit(exitCode); }); // start the app! // you can pass custom configuration to the process as needed await app.start(); } main();