🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

swrap

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swrap

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

latest
npmnpm
Version
0.0.5
Version published
Maintainers
1
Created
Source

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

Keywords

app

FAQs

Package last updated on 09 Dec 2013

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