Skip to content

fast, lightweight, dependency free node js router

License

Notifications You must be signed in to change notification settings

cosmn/nodejs-router

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Node JS routing done simple

const http = require('http')
const router = require('path/to/router').router
const route = new router();

route.get({
	path : '/',
	handlers : [
		indexHandler
	]
})

function indexHandler(req, res){
	res.end('index page')
}

httpServer = http.createServer(route.callback())
httpServer.listen(3000)

About

fast, lightweight, dependency free node js router

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published