Simple wrapper for async main functions.
Combined with async/await, this makes it very easy to write simple async node scripts.
$ npm install async-main --save
const main = default;
- Wraps a promisifed main function and executes it.
- ... if the promise resolves then the program exits with a success exit code (0).
- ... if the promise rejects then it prints the stack trace of the Error and exits with a non-success exit code (1).
Building and Testing
To build the module run:
Then, to run the tests run:
$ make test
ISC. See the file LICENSE.