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)
-
Notifications
You must be signed in to change notification settings - Fork 0
fast, lightweight, dependency free node js router
License
cosmn/nodejs-router
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
fast, lightweight, dependency free node js router
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published