app-ready

Signal that your app is ready for use.

Usage no npm install needed!

<script type="module">
  import appReady from 'https://cdn.skypack.dev/app-ready';
</script>

README

app-ready Build status for app-ready on Circle CI.

Signal that your app is ready for use.

Why?

  • Simple way to track async initialization.
  • Avoids polling the filesystem.
  • Enables graceful start.

Install

npm install app-ready --save

Usage

Get it into your program.

const appReady = require('app-ready');

Tell the parent process that we are ready.

await database.connect();
await server.listen();
appReady();

API

appReady()

If the process is a child of another Node.js process, sends a message event to the parent with a value of ready. Otherwise, does nothing.

Contributing

See our contributing guidelines for more details.

  1. Fork it.
  2. Make a feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request.

License

MPL-2.0 © Seth Holladay

Go make something, dang it.