0.0.10 • Published 9 years ago

bkg v0.0.10

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

bkg

Installation

Install with npm.

npm install bkg

or Clone from github

git clone http://github.com/sgen/bkg

Usage

Create a Daemon:

var bkg = require('bkg');

var daemon = bkg.daemon({
  cmd: 'node',
  args: ['server.js'],
  name: 'my-daemon'
});

daemon.serve().then(function() {
  // do something
}).catch(function(e) {
  console.error(e);
});

daemon.kill().then(function() {
  // do something
}).catch(function(e) {
  console.error(e);
});

Create a server

var bkg = require('bkg');

bkg.server({
  dir : 'static-files',
  port: 8000
}).serve().catch(function(e) {
  console.error(e);
});
0.0.10

9 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago