Socket
Book a DemoInstallSign in
Socket

onboot

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

onboot

Boot when all the bootstraps are laced up

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

onboot

Simple script to register boot strap functions before the bootup actually occurs.

Supports synchronous and asynchronous bootstrapping functions.

usage

  • Set your boot strap calls
  • Define your bootup function

example

var boot = require('onboot');

// synchronous
boot.strap(function () {
  // do dependency work
});

// asynchronous
boot.strap(function (done) {
  setTimeout(function () {
    // some async task
    done();
  }, 2500);
});

boot.up(function () {
  // start server
});

todo

  • client side support (yes, simple, but I'm in a hurry)
  • more tests
  • timeout?

Keywords

boot

FAQs

Package last updated on 07 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts