Skip to content
/ swrap Public

Simple Node service wrapper, with basic support for configs and classes.

License

Notifications You must be signed in to change notification settings

injoin/swrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

swrap Build Status Coverage Status Dependency Status NPM version

Simple Node service wrapper, with basic support for configs and classes. Example:

var swrap = require( "swrap" );
var appwrapper = swrap.app(); // or new wrap.app();

// ...initialize your services, for example express, mongoose, restify, etc:
appwrapper.set( "http", expressApp );
appwrapper.set( "db", mongoose );

// later you can get them:
mongoose = appwrapper.get( "db" );

// We parse configuration JSONs with CJSON, so if you want, comment'em!
appwrapper.config.load( "config/commented.json" );
appwrapper.config.get( "my.nested.config.is.awesome" ); // => the value of your config!

Installation

npm install swrap

Tests

Execute the following commands to get the tests running in swrap:

npm install -d
npm test

License

MIT

About

Simple Node service wrapper, with basic support for configs and classes.

Resources

License

Stars

Watchers

Forks

Packages

No packages published