1.2.5 • Published 7 years ago

express-powerful-router v1.2.5

Weekly downloads
1
License
AGPL-3.0
Repository
github
Last release
7 years ago

express-powerful-router

A new express router that allows you to use ES6 classes and dependency injections

https://www.npmjs.com/package/express-powerful-router

Dependency example

const UserDependency = (req, res) => {
	return { name: 'testUsername' }
}

module.exports = { UserDependency }

Controller example

class TestController{
	testFunction () {
		this.response.send(this.userModel.name)
	}
} 

module.exports = { 
	TestController, 
	routes: [
		['GET', '/', 'testFunction']
	],
	dependencies: {
		userModel: 'testDI'
	}
}
1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.1.2

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago