UNPKG
light-router
Version:
latest (0.1.3)
0.1.11
0.1.3
0.1.2
0.1.1
0.1.0
0.0.211
0.0.31
0.0.22
0.0.21
0.0.11
0.0.3
0.0.2
0.0.1
A node.js perfomance efficient http router.
github.com/herenow/light-router
herenow/light-router
light-router
/
lib
/
routes.js
17 lines
(13 loc)
•
300 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//Methods
var
Methods
=
[
'GET'
,
'POST'
,
'PUT'
,
'HEAD'
,
'DELETE'
,
'OPTIONS'
,
'TRACE'
,
'CONNECT'
]
//Routing hashtable
var
Table
=
{}
//Build the table
for
(
var
i in Methods) { Table[ Methods[i] ] = { staticRoutes: {}, dynamicRoutes: {}, } }
//Export it
module
.
exports
= Table