0.2.3 • Published 10 years ago

neatly v0.2.3

Weekly downloads
46
License
-
Repository
github
Last release
10 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

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago