0.2.3 • Published 8 years ago

neatly v0.2.3

Weekly downloads
46
License
-
Repository
github
Last release
8 years ago

Neatly

Neat, extensible and dead simple di system for nodejs.

Build Status

Purpose

Isolate business-logic from server configuration.

Install

npm install --save neatly

Usage

const neatly = require('neatly');
const dbModule = require('./your-db-module');

const app = neatly.module('app', [
	dbModule
]);

app.config(($dbProvider) => {

	$dbProvider.connect('localhost', 'my-app-db');

});

app.factory('UserService', ($db) => {

	return {
		getById: function(id) {
			return $db.User.getById(id);
		}
	}
});

neatly.bootstrap(app)
	.then((instance) => {
		instance.services.UserService.getById(1);
	});

#Author

@platdesign

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago