{"_id":"iroute","_rev":"33-201bbe172d98aedeb45c9023393a1b97","name":"iroute","description":"High performance nodejs route with c++","dist-tags":{"latest":"0.3.2"},"versions":{"0.1.0":{"name":"iroute","version":"0.1.0","main":"index.js","description":"High performance nodejs route,using libuv and multi thread to handler the request,all of it are asynchronous and non-block","keywords":["route","libuv","asynchronous","non-block"],"author":{"name":"doublespout","email":"snoopyxdy@163.com"},"homepage":"https://github.com/DoubleSpout/iroute","bugs":{"url":"https://github.com/DoubleSpout/iroute/issues","email":"snoopyxdy@163.com"},"repository":{"type":"git","url":"https://github.com/DoubleSpout/iroute.git"},"scripts":{"preinstall":"node install.js","install":"node-gyp rebuild","test":"node ./test/main_test.js"},"os":["macos","linux","darwin","win32"],"engines":{"node":">=0.10.0"},"contributors":[{"name":"//iroute"},{"name":"2013-05-29 double spout","email":"snoopyxdy@163.com"}],"readme":"ERROR: No README.md file found!","readmeFilename":"README.md","_id":"iroute@0.1.0","dist":{"shasum":"dcb605153cf79e9c1c7a3aa06b7a9d556434089b","tarball":"https://registry.npmjs.org/iroute/-/iroute-0.1.0.tgz","integrity":"sha512-uO8rJcTIFj+yZB6lreiDOxx2/k+aWd1SiWOmILQmQS3RSpZzermUY7+OcsM6aUxJtZxAjYIdXHoQRdYSUuVEHQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEGeCNoBLHHIdI0Gp9kvqjbsy0SC+42wga8p5z6c509gAiBk3Z9Ayi/QHXcpjTem0Gt+AxtGjkliLYVvFI06+WcYcw=="}]},"_npmVersion":"1.2.0","_npmUser":{"name":"doublespout","email":"snoopyxdy@gmail.com"},"maintainers":[{"name":"doublespout","email":"snoopyxdy@gmail.com"}]},"0.1.1":{"name":"iroute","version":"0.1.1","main":"index.js","description":"High performance nodejs route with c++","keywords":["route","libuv","asynchronous","non-block"],"author":{"name":"doublespout","email":"snoopyxdy@163.com"},"homepage":"https://github.com/DoubleSpout/iroute","bugs":{"url":"https://github.com/DoubleSpout/iroute/issues","email":"snoopyxdy@163.com"},"repository":{"type":"git","url":"https://github.com/DoubleSpout/iroute.git"},"scripts":{"preinstall":"node install.js","install":"node-gyp rebuild","test":"node ./test/main_test.js"},"os":["macos","linux","darwin","win32"],"engines":{"node":">=0.10.0"},"contributors":[{"name":"//iroute"},{"name":"2013-05-29 double spout","email":"snoopyxdy@163.com"}],"readme":"# iroute(fast and simple nodejs http/https router module)\r\n\r\nif you only want to build a simple http server and don't want to use express,so iroute module could simple and fast to handler the request to action.\r\nthe module are also be used in flat.js framework.\r\n\r\n## Installing the module\r\n\r\nWith [npm](http://npmjs.org/):\r\n\r\niroute module is supported windows, linux, mac.\r\n\r\nMake sure, node-gyp has installed.\r\n\r\n     npm install iroute\r\n\r\nFrom source:\r\n\r\n     git clone https://github.com/DoubleSpout/iroute.git\r\n     cd iroute\r\n     node-gyp rebuild\r\n\r\nTo include the module in your project:\r\n\r\n     var iroute = require('iroute');\r\n\r\n##benchmark\r\n\r\nto run 1000 handler and match 10000 times,regexp match and iroute result is follow:\r\n\r\n      regexp: 1107ms\r\n      cb1 run times :10000\r\n      iroute: 251ms\r\n      cb2 run times :10000\r\n\r\nwow!!it's 4 times faster than regex match router.\r\n\r\n## example\r\n\r\n    var iroute = require('iroute')\r\n\r\n    iroute.add([\r\n\r\n      [\"get:/hello/world\",function(req,res){res.end('hello world')}],\r\n\r\n    ],function(req,res){\r\n\r\n        res.statusCode = 404;\r\n\r\n        res.end('404')\r\n\r\n    })\r\n\r\n    var http = require('http');\r\n\r\n    http.createServer(function (req, res) {\r\n\r\n      iroute.route(req,res);\r\n\r\n    }).listen(8124);\r\n\r\nthen request the 127.0.0.1:8124 you can see 'hello world'\r\n\r\n##API\r\n\r\niroute.add(routearray [,not_match_function]);\r\n\r\niroute.route(req,res);\r\n\r\nroutearray:\r\n\r\n  [\r\n    [{method}:{url}?{key1}&{key2},function(req,res){}]\r\n    ...\r\n  ]\r\n\r\n  example:\r\n\r\n      [\r\n\r\n      [\"get:/hello/world/?key1&key2\",function(req,res){  }]\r\n\r\n      ]\r\n\r\nnot_match_function:\r\nif iroute not match the request,the not_match_function will be called.It has two parameters,req and res.\r\n\r\nmore example see /example/example.js\r\n","readmeFilename":"README.md","_id":"iroute@0.1.1","dist":{"shasum":"9b570787c08af31097ccb891b8357f0d6d1c4436","tarball":"https://registry.npmjs.org/iroute/-/iroute-0.1.1.tgz","integrity":"sha512-0Qfz997nGTXQQglhWsbfA7PFMHlMLU4ngJMcd/YRK/ubI7YFKQDOFxz2Q4xQkIfbud980g1FLi9fE2rrRGyXcw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaulVJlfGW6s6GDFYfvWepR0TViSBZ4UMZ9zAtaI8jeAIgONKNxVmQuvtAMjxWKmNIz0JuQUWYq3fg5vt1zk+8tp4="}]},"_from":".","_npmVersion":"1.2.24","_npmUser":{"name":"doublespout","email":"snoopyxdy@gmail.com"},"maintainers":[{"name":"doublespout","email":"snoopyxdy@gmail.com"}]},"0.1.2":{"name":"iroute","version":"0.1.2","main":"index.js","description":"High performance nodejs route with c++","keywords":["route","libuv","asynchronous","non-block"],"author":{"name":"doublespout","email":"snoopyxdy@163.com"},"homepage":"https://github.com/DoubleSpout/iroute","bugs":{"url":"https://github.com/DoubleSpout/iroute/issues","email":"snoopyxdy@163.com"},"repository":{"type":"git","url":"https://github.com/DoubleSpout/iroute.git"},"scripts":{"preinstall":"node install.js","install":"node-gyp rebuild","test":"node ./test/main_test.js"},"os":["macos","linux","darwin","win32"],"engines":{"node":">=0.10.0"},"contributors":[{"name":"//iroute"},{"name":"2013-05-29 double spout","email":"snoopyxdy@163.com"}],"readme":"# iroute(fast and simple nodejs http/https router module) [![Build Status](https://travis-ci.org/DoubleSpout/iroute.png?branch=master)](https://travis-ci.org/DoubleSpout/iroute)\r\n\r\nif you only want to build a simple http server and don't want to use express,so iroute module could simple and fast to handler the request to action.\r\nthe module are also be used in flat.js framework.\r\n\r\n## Installing the module\r\n\r\nWith [npm](http://npmjs.org/):\r\n\r\niroute module is supported windows, linux, mac.\r\n\r\nMake sure, node-gyp has installed.\r\n\r\n     npm install iroute\r\n\r\nFrom source:\r\n\r\n     git clone https://github.com/DoubleSpout/iroute.git\r\n     cd iroute\r\n     node-gyp rebuild\r\n\r\nTo include the module in your project:\r\n\r\n     var iroute = require('iroute');\r\n\r\n##benchmark\r\n\r\nto run 1000 handler and match 10000 times,regexp match and iroute result is follow:\r\n\r\n      regexp: 1107ms\r\n      cb1 run times :10000\r\n      iroute: 251ms\r\n      cb2 run times :10000\r\n\r\nwow!!it's 4 times faster than regex match router.\r\n\r\n## example\r\n\r\n    var iroute = require('iroute')\r\n\r\n    iroute.add([\r\n\r\n      [\"get:/hello/world\",function(req,res){res.end('hello world')}],\r\n\r\n    ],function(req,res){\r\n\r\n        res.statusCode = 404;\r\n\r\n        res.end('404')\r\n\r\n    })\r\n\r\n    var http = require('http');\r\n\r\n    http.createServer(function (req, res) {\r\n\r\n      iroute.route(req,res);\r\n\r\n    }).listen(8124);\r\n\r\nthen request the 127.0.0.1:8124 you can see 'hello world'\r\n\r\n##API\r\n\r\niroute.add(routearray [,not_match_function]);\r\n\r\niroute.route(req,res);\r\n\r\nroutearray:\r\n\r\n  [\r\n    [{method}:{url}?{key1}&{key2},function(req,res){}]\r\n    ...\r\n  ]\r\n\r\n  example:\r\n\r\n      [\r\n\r\n      [\"get:/hello/world/?key1&key2\",function(req,res){  }]\r\n\r\n      ]\r\n\r\nnot_match_function:\r\nif iroute not match the request,the not_match_function will be called.It has two parameters,req and res.\r\n\r\nmore example see /example/example.js\r\n","readmeFilename":"README.md","_id":"iroute@0.1.2","dist":{"shasum":"0f2a7e7c967b7756e3765f8c49797683229968ec","tarball":"https://registry.npmjs.org/iroute/-/iroute-0.1.2.tgz","integrity":"sha512-Om39LLjkBK7dHBK61MveFB06Kb34Rsp/8sX5lkMBSiUoXIzXemf/Sy+EaPHLpdb1f6a1qceOPzGxQp4RL35cVQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQTadXceTv1PkjWPXlLwtsZIVFg/GqUuEdEWc8mgzqhwIhAOJmjn9VhSqgluUwTfHh4dqhMy89BE9ERF+Cevpamrcj"}]},"_from":".","_npmVersion":"1.2.24","_npmUser":{"name":"doublespout","email":"snoopyxdy@gmail.com"},"maintainers":[{"name":"doublespout","email":"snoopyxdy@gmail.com"}]},"0.1.5":{"name":"iroute","version":"0.1.5","main":"index.js","description":"High performance nodejs route with c++","keywords":["route","libuv","asynchronous","non-block"],"author":{"name":"doublespout","email":"snoopyxdy@163.com"},"homepage":"https://github.com/DoubleSpout/iroute","bugs":{"url":"https://github.com/DoubleSpout/iroute/issues","email":"snoopyxdy@163.com"},"repository":{"type":"git","url":"https://github.com/DoubleSpout/iroute.git"},"scripts":{"install":"node-gyp rebuild","test":"node ./test/main_test.js"},"os":["macos","linux","darwin","win32"],"engines":{"node":">=0.10.0"},"gypfile":true,"contributors":[{"name":"//iroute"},{"name":"2013-05-29 double spout","email":"snoopyxdy@163.com"}],"readme":"# iroute(fast and simple nodejs http/https router module) [![Build Status](https://travis-ci.org/DoubleSpout/iroute.png?branch=master)](https://travis-ci.org/DoubleSpout/iroute)\r\n\r\nif you only want to build a simple http server and don't want to use express,so iroute module could simple and fast to handler the request to action.\r\nthe module are also be used in flat.js framework.\r\n\r\n## Installing the module\r\n\r\nWith [npm](http://npmjs.org/):\r\n\r\niroute module is supported windows, linux, mac.\r\n\r\nMake sure, node-gyp has installed.\r\n\r\n     npm install iroute\r\n\r\nFrom source:\r\n\r\n     git clone https://github.com/DoubleSpout/iroute.git\r\n     cd iroute\r\n     node-gyp rebuild\r\n\r\nTo include the module in your project:\r\n\r\n     var iroute = require('iroute');\r\n\r\n##benchmark\r\n\r\nto run 1000 handler and match 10000 times,regexp match and iroute result is follow:\r\n\r\n      regexp: 1107ms\r\n      cb1 run times :10000\r\n      iroute: 251ms\r\n      cb2 run times :10000\r\n\r\nwow!!it's 4 times faster than regex match router.\r\n\r\n## example\r\n\r\n    var iroute = require('iroute')\r\n\r\n    iroute.add([\r\n\r\n      [\"get:/hello/world\",function(req,res){res.end('hello world')}],\r\n\r\n    ],function(req,res){\r\n\r\n        res.statusCode = 404;\r\n\r\n        res.end('404')\r\n\r\n    })\r\n\r\n    var http = require('http');\r\n\r\n    http.createServer(function (req, res) {\r\n\r\n      iroute.route(req,res);\r\n\r\n    }).listen(8124);\r\n\r\nthen request the 127.0.0.1:8124 you can see 'hello world'\r\n\r\n##API\r\n\r\niroute.add(routearray [,not_match_function]);\r\n\r\niroute.route(req,res);\r\n\r\nroutearray:\r\n\r\n  [\r\n    [{method}:{url}?{key1}&{key2},function(req,res){}]\r\n    ...\r\n  ]\r\n\r\n  example:\r\n\r\n      [\r\n\r\n      [\"get:/hello/world/?key1&key2\",function(req,res){  }]\r\n\r\n      ]\r\n\r\nnot_match_function:\r\nif iroute not match the request,the not_match_function will be called.It has two parameters,req and res.\r\n\r\nmore example see /example/example.js\r\n","readmeFilename":"README.md","_id":"iroute@0.1.5","dist":{"shasum":"3280be99142ca584dc47df95462b25693c2f9765","tarball":"https://registry.npmjs.org/iroute/-/iroute-0.1.5.tgz","integrity":"sha512-pq1+pZu9A3K1VUuwvbOnnw2BtTxcvR8na9xOHRh/qc+1/IdEeS/3KnA2vYTSMBGWJKMifbgYkNxeo+ULeR/cGg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEYy+eGMpOo0JtSNJu+rrjt1v+8nPuZU7Qrt8trpPU8gAiEAiKIP4NImUzeq90ZP4dKs58d6O8OIKXp78NswJ3OCLUY="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"doublespout","email":"snoopyxdy@gmail.com"},"maintainers":[{"name":"doublespout","email":"snoopyxdy@gmail.com"}]},"0.1.6":{"name":"iroute","version":"0.1.6","main":"index.js","description":"High performance nodejs route with c++","keywords":["route","libuv","asynchronous","non-block"],"author":{"name":"doublespout","email":"snoopyxdy@163.com"},"homepage":"https://github.com/DoubleSpout/iroute","bugs":{"url":"https://github.com/DoubleSpout/iroute/issues","email":"snoopyxdy@163.com"},"repository":{"type":"git","url":"https://github.com/DoubleSpout/iroute.git"},"scripts":{"install":"node-gyp rebuild","test":"node ./test/main_test.js"},"os":["macos","linux","darwin","win32"],"engines":{"node":">=0.10.0"},"gypfile":true,"contributors":[{"name":"//iroute"},{"name":"2013-05-29 double spout","email":"snoopyxdy@163.com"}],"readme":"# iroute(fast and simple nodejs http/https router module) [![Build Status](https://travis-ci.org/DoubleSpout/iroute.png?branch=master)](https://travis-ci.org/DoubleSpout/iroute)\r\n\r\nif you only want to build a simple http server and don't want to use express,so iroute module could simple and fast to handler the request to action.\r\nthe module are also be used in flat.js framework.\r\n\r\n## Installing the module\r\n\r\nWith [npm](http://npmjs.org/):\r\n\r\niroute module is supported windows, linux, mac.\r\n\r\nMake sure, node-gyp has installed.\r\n\r\n     npm install iroute\r\n\r\nFrom source:\r\n\r\n     git clone https://github.com/DoubleSpout/iroute.git\r\n     cd iroute\r\n     node-gyp rebuild\r\n\r\nTo include the module in your project:\r\n\r\n     var iroute = require('iroute');\r\n\r\n##benchmark\r\n\r\nto run 1000 handler and match 10000 times,regexp match and iroute result is follow:\r\n\r\n      regexp: 1107ms\r\n      cb1 run times :10000\r\n      iroute: 251ms\r\n      cb2 run times :10000\r\n\r\nwow!!it's 4 times faster than regex match router.\r\n\r\n## example\r\n\r\n    var iroute = require('iroute')\r\n\r\n    iroute.add([\r\n\r\n      [\"get:/hello/world\",function(req,res){res.end('hello world')}],\r\n\r\n    ],function(req,res){\r\n\r\n        res.statusCode = 404;\r\n\r\n        res.end('404')\r\n\r\n    })\r\n\r\n    var http = require('http');\r\n\r\n    http.createServer(function (req, res) {\r\n\r\n      iroute.route(req,res);\r\n\r\n    }).listen(8124);\r\n\r\nthen request the 127.0.0.1:8124 you can see 'hello world'\r\n\r\n##API\r\n\r\niroute.add(routearray [,not_match_function]);\r\n\r\niroute.route(req,res);\r\n\r\nroutearray:\r\n\r\n  [\r\n    [{method}:{url}?{key1}&{key2},function(req,res){}]\r\n    ...\r\n  ]\r\n\r\n  example:\r\n\r\n      [\r\n\r\n      [\"get:/hello/world/?key1&key2\",function(req,res){  }]\r\n\r\n      ]\r\n\r\nnot_match_function:\r\nif iroute not match the request,the not_match_function will be called.It has two parameters,req and res.\r\n\r\nmore example see /example/example.js\r\n","readmeFilename":"README.md","_id":"iroute@0.1.6","dist":{"shasum":"dba36e3cbbd1407173f17b827c73a1a9a3c4ab9b","tarball":"https://registry.npmjs.org/iroute/-/iroute-0.1.6.tgz","integrity":"sha512-KUF1Q3gdqKNms1YDGeDw8aadYtxme5OVLb5FZidWDHf7nZcsG5vt9VJed04Y6GvS1c7deFezzxbnfbxdiVfeSA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2Pi1Q4Cjnxj8e8+kyjNv/ttVPwwFSxy63jqMgh1TvWQIhAPcLyVC9QWUOyV4PGG+MrWMeqHWJHvQVu1e6XuVBvr/Q"}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"doublespout","email":"snoopyxdy@gmail.com"},"maintainers":[{"name":"doublespout","email":"snoopyxdy@gmail.com"}]},"0.1.7":{"name":"iroute","version":"0.1.7","main":"index.js","description":"High performance nodejs route with c++","keywords":["route","libuv","asynchronous","non-block"],"author":{"name":"doublespout","email":"snoopyxdy@163.com"},"homepage":"https://github.com/DoubleSpout/iroute","bugs":{"url":"https://github.com/DoubleSpout/iroute/issues","email":"snoopyxdy@163.com"},"repository":{"type":"git","url":"https://github.com/DoubleSpout/iroute.git"},"scripts":{"install":"node-gyp rebuild","test":"node ./test/main_test.js"},"os":["macos","linux","darwin","win32"],"engines":{"node":">=0.10.0"},"gypfile":true,"contributors":[{"name":"//iroute"},{"name":"2013-05-29 double spout","email":"snoopyxdy@163.com"}],"readme":"# iroute(fast and simple nodejs http/https router module) [![Build Status](https://travis-ci.org/DoubleSpout/iroute.png?branch=master)](https://travis-ci.org/DoubleSpout/iroute)\r\n\r\nif you only want to build a simple http server and don't want to use express,so iroute module could simple and fast to handler the request to action.\r\nthe module are also be used in flat.js framework.\r\n\r\n## Installing the module\r\n\r\nWith [npm](http://npmjs.org/):\r\n\r\niroute module is supported windows, linux, mac.\r\n\r\nMake sure, node-gyp has installed.\r\n\r\n     npm install iroute\r\n\r\nFrom source:\r\n\r\n     git clone https://github.com/DoubleSpout/iroute.git\r\n     cd iroute\r\n     node-gyp rebuild\r\n\r\nTo include the module in your project:\r\n\r\n     var iroute = require('iroute');\r\n\r\n##benchmark\r\n\r\nto run 1000 handler and match 10000 times,regexp match and iroute result is follow:\r\n\r\n      regexp: 1107ms\r\n      cb1 run times :10000\r\n      iroute: 251ms\r\n      cb2 run times :10000\r\n\r\nwow!!it's 4 times faster than regex match router.\r\n\r\n## example\r\n\r\n    var iroute = require('iroute')\r\n\r\n    iroute.add([\r\n\r\n      [\"get:/hello/world\",function(req,res){res.end('hello world')}],\r\n\r\n    ],function(req,res){\r\n\r\n        res.statusCode = 404;\r\n\r\n        res.end('404')\r\n\r\n    })\r\n\r\n    var http = require('http');\r\n\r\n    http.createServer(function (req, res) {\r\n\r\n      iroute.route(req,res);\r\n\r\n    }).listen(8124);\r\n\r\nthen request the 127.0.0.1:8124 you can see 'hello world'\r\n\r\n##API\r\n\r\niroute.add(routearray [,not_match_function]);\r\n\r\niroute.route(req,res);\r\n\r\nroutearray:\r\n\r\n  [\r\n    [{method}:{url}?{key1}&{key2},function(req,res){}]\r\n    ...\r\n  ]\r\n\r\n  example:\r\n\r\n      [\r\n\r\n      [\"get:/hello/world/?key1&key2\",function(req,res){  }]\r\n\r\n      ]\r\n\r\nnot_match_function:\r\nif iroute not match the request,the not_match_function will be called.It has two parameters,req and res.\r\n\r\nmore example see /example/example.js\r\n","readmeFilename":"README.md","_id":"iroute@0.1.7","dist":{"shasum":"276d5aea6474dcd6c817a598f7fcec6ef7b09bc1","tarball":"https://registry.npmjs.org/iroute/-/iroute-0.1.7.tgz","integrity":"sha512-oPc0+r8iK7B210BGimnuY4kp4m3FLWxBH4M8MHflol3hJRdut8SDVvum88gegWK+5gh/SUFWsSPVynw6LTDL4A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqlRKqIcMz90NYxCGgjOeXO1AxwFEIiL4c7634LIcTqQIgL9ILXQyJcKdKY/ON/FcFHCMFFim083ReLNSBC45P0y0="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"doublespout","email":"snoopyxdy@gmail.com"},"maintainers":[{"name":"doublespout","email":"snoopyxdy@gmail.com"}]},"0.1.9":{"name":"iroute","version":"0.1.9","main":"index.js","description":"High performance nodejs route with c++","keywords":["route","libuv","asynchronous","non-block"],"author":{"name":"doublespout","email":"snoopyxdy@163.com"},"homepage":"https://github.com/DoubleSpout/iroute","bugs":{"url":"https://github.com/DoubleSpout/iroute/issues","email":"snoopyxdy@163.com"},"repository":{"type":"git","url":"https://github.com/DoubleSpout/iroute.git"},"scripts":{"install":"node-gyp rebuild","test":"node ./test/main_test.js"},"os":["macos","linux","darwin","win32"],"engines":{"node":">=0.10.0"},"gypfile":true,"contributors":[{"name":"//iroute"},{"name":"2013-05-29 double spout","email":"snoopyxdy@163.com"}],"readme":"# iroute(fast and simple nodejs http/https router module) [![Build Status](https://travis-ci.org/DoubleSpout/iroute.png?branch=master)](https://travis-ci.org/DoubleSpout/iroute)\r\n\r\nif you only want to build a simple http server and don't want to use express,so iroute module could simple and fast to handler the request to action.\r\nthe module are also be used in flat.js framework.\r\n\r\n## Installing the module\r\n\r\nWith [npm](http://npmjs.org/):\r\n\r\niroute module is supported windows, linux, mac.\r\n\r\nMake sure, node-gyp has installed.\r\n\r\n     npm install iroute\r\n\r\nFrom source:\r\n\r\n     git clone https://github.com/DoubleSpout/iroute.git\r\n     cd iroute\r\n     node-gyp rebuild\r\n\r\nTo include the module in your project:\r\n\r\n     var iroute = require('iroute');\r\n\r\n##benchmark\r\n\r\nto run 1000 handler and match 10000 times,regexp match and iroute result is follow:\r\n\r\n      regexp: 1107ms\r\n      cb1 run times :10000\r\n      iroute: 251ms\r\n      cb2 run times :10000\r\n\r\nwow!!it's 4 times faster than regex match router.\r\n\r\n## example\r\n\r\n    var iroute = require('iroute')\r\n\r\n    iroute.add([\r\n\r\n      [\"get:/hello/world\",function(req,res){res.end('hello world')}],\r\n\r\n    ],function(req,res){\r\n\r\n        res.statusCode = 404;\r\n\r\n        res.end('404')\r\n\r\n    })\r\n\r\n    var http = require('http');\r\n\r\n    http.createServer(function (req, res) {\r\n\r\n      iroute.route(req,res);\r\n\r\n    }).listen(8124);\r\n\r\nthen request the 127.0.0.1:8124 you can see 'hello world'\r\n\r\n##API\r\n\r\niroute.add(routearray [,not_match_function]);\r\n\r\niroute.route(req,res);\r\n\r\nroutearray:\r\n\r\n  [\r\n    [{method}:{url}?{key1}&{key2},function(req,res){}]\r\n    ...\r\n  ]\r\n\r\n  example:\r\n\r\n      [\r\n\r\n      [\"get:/hello/world/?key1&key2\",function(req,res){  }]\r\n\r\n      ]\r\n\r\nnot_match_function:\r\nif iroute not match the request,the not_match_function will be called.It has two parameters,req and res.\r\n\r\nmore example see /example/example.js\r\n","readmeFilename":"README.md","_id":"iroute@0.1.9","dist":{"shasum":"abf66d756257774c6b4aaf5e464cca595f5b9bb9","tarball":"https://registry.npmjs.org/iroute/-/iroute-0.1.9.tgz","integrity":"sha512-b4hCq9WRswemAyoT8ufdgz605PcmWvuW402jWhxHF6iWghCFuKdGkMLIRzKyw9pF27/RFguslV6ZgBrLY8atSQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICfj6jpNt47SfGWjXmrMDFL6UnCb38q++18iEk+ymRbfAiEAs/h/S4YsW/PF0jzRAgi+/pWbrQCKtEfZEc9w+t0jNAw="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"doublespout","email":"snoopyxdy@gmail.com"},"maintainers":[{"name":"doublespout","email":"snoopyxdy@gmail.com"}]},"0.2.0":{"name":"iroute","version":"0.2.0","main":"index.js","description":"High performance nodejs route with c++","keywords":["route","libuv","asynchronous","non-block"],"author":{"name":"doublespout","email":"snoopyxdy@163.com"},"homepage":"https://github.com/DoubleSpout/iroute","bugs":{"url":"https://github.com/DoubleSpout/iroute/issues","email":"snoopyxdy@163.com"},"repository":{"type":"git","url":"https://github.com/DoubleSpout/iroute.git"},"scripts":{"install":"node-gyp rebuild","test":"node ./test/main_test.js"},"os":["macos","linux","darwin","win32"],"engines":{"node":">=0.10.0"},"gypfile":true,"contributors":[{"name":"//iroute"},{"name":"2013-05-29 double spout","email":"snoopyxdy@163.com"}],"readme":"# iroute(fast and simple nodejs http/https router module) [![Build Status](https://travis-ci.org/DoubleSpout/iroute.png?branch=master)](https://travis-ci.org/DoubleSpout/iroute)\r\n\r\nif you only want to build a simple http server and don't want to use express,so iroute module could simple and fast to handler the request to action.\r\nthe module are also be used in flat.js framework.\r\n\r\n## Installing the module\r\n\r\nWith [npm](http://npmjs.org/):\r\n\r\niroute module is supported windows, linux, mac.\r\n\r\nMake sure, node-gyp has installed.\r\n\r\n     npm install iroute\r\n\r\nFrom source:\r\n\r\n     git clone https://github.com/DoubleSpout/iroute.git\r\n     cd iroute\r\n     node-gyp rebuild\r\n\r\nTo include the module in your project:\r\n\r\n     var iroute = require('iroute');\r\n\r\n##benchmark\r\n\r\nto run 1000 handler and match 10000 times,regexp match and iroute result is follow:\r\n\r\n      regexp: 1107ms\r\n      cb1 run times :10000\r\n      iroute: 251ms\r\n      cb2 run times :10000\r\n\r\nwow!!it's 4 times faster than regex match router.\r\n\r\n## example\r\n\r\n    var iroute = require('iroute')\r\n\r\n    iroute.add([\r\n\r\n      [\"get:/hello/world\",function(req,res){res.end('hello world')}],\r\n\r\n    ],function(req,res){\r\n\r\n        res.statusCode = 404;\r\n\r\n        res.end('404')\r\n\r\n    })\r\n\r\n    var http = require('http');\r\n\r\n    http.createServer(function (req, res) {\r\n\r\n      iroute.route(req,res);\r\n\r\n    }).listen(8124);\r\n\r\nthen request the 127.0.0.1:8124 you can see 'hello world'\r\n\r\n##API\r\n\r\niroute.add(routearray [,not_match_function]);\r\n\r\niroute.route(req,res);\r\n\r\nroutearray:\r\n\r\n  [\r\n    [{method}:{url}?{key1}&{key2},function(req,res){}]\r\n    ...\r\n  ]\r\n\r\n  example:\r\n\r\n      [\r\n\r\n      [\"get:/hello/world/?key1&key2\",function(req,res){  }]\r\n\r\n      ]\r\n\r\nnot_match_function:\r\nif iroute not match the request,the not_match_function will be called.It has two parameters,req and res.\r\n\r\nmore example see /example/example.js\r\n","readmeFilename":"README.md","_id":"iroute@0.2.0","dist":{"shasum":"d28a6f65393d2351ce9e31661b23de182182bb01","tarball":"https://registry.npmjs.org/iroute/-/iroute-0.2.0.tgz","integrity":"sha512-Wi+v7X3DZdw/5KdFou5/f+9osk1lMANCirHjsPhNrC0/wjElY3r0T7QsiAVurcsSenF9QUds7kl6aEvFYXDXpQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7FW/69S9tZ5ib+wIjpcSXCheTcABBlsU+oUZi1GjQTQIhAIx+6K1Ig4G5JhlyFHoUiVZcdh+H0hmXVYPbUJ5lSFv4"}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"doublespout","email":"snoopyxdy@gmail.com"},"maintainers":[{"name":"doublespout","email":"snoopyxdy@gmail.com"}]},"0.2.1":{"name":"iroute","version":"0.2.1","main":"index.js","description":"High performance nodejs route with c++","keywords":["route","libuv","asynchronous","non-block"],"author":{"name":"doublespout","email":"snoopyxdy@163.com"},"homepage":"https://github.com/DoubleSpout/iroute","bugs":{"url":"https://github.com/DoubleSpout/iroute/issues","email":"snoopyxdy@163.com"},"repository":{"type":"git","url":"https://github.com/DoubleSpout/iroute.git"},"scripts":{"install":"node-gyp rebuild","test":"node ./test/main_test.js"},"os":["macos","linux","darwin","win32"],"engines":{"node":">=0.10.0"},"contributors":[{"name":"//iroute"},{"name":"2013-05-29 double spout","email":"snoopyxdy@163.com"}],"readme":"# iroute(fast and simple nodejs http/https router module) [![Build Status](https://travis-ci.org/DoubleSpout/iroute.png?branch=master)](https://travis-ci.org/DoubleSpout/iroute)\r\n\r\nif you only want to build a simple http server and don't want to use express,so iroute module could simple and fast to handler the request to action.\r\nthe module are also be used in flat.js framework.\r\n\r\n## Installing the module\r\n\r\nWith [npm](http://npmjs.org/):\r\n\r\niroute module is supported windows, linux, mac.\r\n\r\nMake sure, node-gyp has installed.\r\n\r\n     npm install iroute\r\n\r\nFrom source:\r\n\r\n     git clone https://github.com/DoubleSpout/iroute.git\r\n     cd iroute\r\n     node-gyp rebuild\r\n\r\nTo include the module in your project:\r\n\r\n     var iroute = require('iroute');\r\n\r\n##benchmark\r\n\r\nto run 1000 handler and match 10000 times,regexp match and iroute result is follow:\r\n\r\n      regexp: 1107ms\r\n      cb1 run times :10000\r\n      iroute: 251ms\r\n      cb2 run times :10000\r\n\r\nwow!!it's 4 times faster than regex match router.\r\n\r\n## example\r\n\r\n    var iroute = require('iroute')\r\n\r\n    iroute.add([\r\n\r\n      [\"get:/hello/world\",function(req,res){res.end('hello world')}],\r\n\r\n    ],function(req,res){\r\n\r\n        res.statusCode = 404;\r\n\r\n        res.end('404')\r\n\r\n    })\r\n\r\n    var http = require('http');\r\n\r\n    http.createServer(function (req, res) {\r\n\r\n      iroute.route(req,res);\r\n\r\n    }).listen(8124);\r\n\r\nthen request the 127.0.0.1:8124 you can see 'hello world'\r\n\r\n##API\r\n\r\niroute.add(routearray [,not_match_function]);\r\n\r\niroute.route(req,res);\r\n\r\nroutearray:\r\n\r\n  [\r\n    [{method}:{url}?{key1}&{key2},function(req,res){}]\r\n    ...\r\n  ]\r\n\r\n  example:\r\n\r\n      [\r\n\r\n      [\"get:/hello/world/?key1&key2\",function(req,res){  }]\r\n\r\n      ]\r\n\r\nnot_match_function:\r\nif iroute not match the request,the not_match_function will be called.It has two parameters,req and res.\r\nsupport: get,post,put,delete,options,head,other (other include copy,trace,lock.. etc)\r\n\r\nmore example see /example/example.js\r\n","readmeFilename":"README.md","gypfile":true,"_id":"iroute@0.2.1","dist":{"shasum":"b19d7b2e6b618e004bc9ab645606a61fd2f6e671","tarball":"https://registry.npmjs.org/iroute/-/iroute-0.2.1.tgz","integrity":"sha512-s7pxBWitxupa6h1QP719jsAGt8FThCDw31MA6IvBRQhycdy+Pr5MqtiSNG4fabWE+mNaM4/ttYdT+BI/BDOWWg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID4jNGHsjpYRl3HeEzjjoxEo9Cv46mw5ghMDEGOaf2F7AiEA5zNlEQkW/k17PinyGzmt2nntCZXy6JrzILkodCgg+ro="}]},"_from":".","_npmVersion":"1.2.24","_npmUser":{"name":"doublespout","email":"snoopyxdy@gmail.com"},"maintainers":[{"name":"doublespout","email":"snoopyxdy@gmail.com"}]},"0.2.2":{"name":"iroute","version":"0.2.2","main":"index.js","description":"High performance nodejs route with c++","keywords":["route","libuv","asynchronous","non-block"],"author":{"name":"doublespout","email":"snoopyxdy@163.com"},"homepage":"https://github.com/DoubleSpout/iroute","bugs":{"url":"https://github.com/DoubleSpout/iroute/issues","email":"snoopyxdy@163.com"},"repository":{"type":"git","url":"https://github.com/DoubleSpout/iroute.git"},"scripts":{"install":"node-gyp rebuild","test":"node ./test/main_test.js"},"os":["macos","linux","darwin","win32"],"engines":{"node":">=0.10.0"},"contributors":[{"name":"//iroute"},{"name":"2013-05-29 double spout","email":"snoopyxdy@163.com"}],"readme":"# iroute(fast and simple nodejs http/https router module) [![Build Status](https://travis-ci.org/DoubleSpout/iroute.png?branch=master)](https://travis-ci.org/DoubleSpout/iroute)\r\n\r\nif you only want to build a simple http server and don't want to use express,so iroute module could simple and fast to handler the request to action.\r\nthe module are also be used in flat.js framework.\r\n\r\n## Installing the module\r\n\r\nWith [npm](http://npmjs.org/):\r\n\r\niroute module is supported windows, linux, mac.\r\n\r\nMake sure, node-gyp has installed.\r\n\r\n     npm install iroute\r\n\r\nFrom source:\r\n\r\n     git clone https://github.com/DoubleSpout/iroute.git\r\n     cd iroute\r\n     node-gyp rebuild\r\n\r\nTo include the module in your project:\r\n\r\n     var iroute = require('iroute');\r\n\r\n##benchmark\r\n\r\nto run 1000 handler and match 10000 times,regexp match and iroute result is follow:\r\n\r\n      regexp: 1107ms\r\n      cb1 run times :10000\r\n      iroute: 251ms\r\n      cb2 run times :10000\r\n\r\nwow!!it's 4 times faster than regex match router.\r\n\r\n## example\r\n\r\n    var iroute = require('iroute')\r\n\r\n    iroute.add([\r\n\r\n      [\"get:/hello/world\",function(req,res){res.end('hello world')}],\r\n\r\n    ],function(req,res){\r\n\r\n        res.statusCode = 404;\r\n\r\n        res.end('404')\r\n\r\n    })\r\n\r\n    var http = require('http');\r\n\r\n    http.createServer(function (req, res) {\r\n\r\n      iroute.route(req,res);\r\n\r\n    }).listen(8124);\r\n\r\nthen request the 127.0.0.1:8124 you can see 'hello world'\r\n\r\n##API\r\n\r\niroute.add(routearray [,not_match_function]);\r\n\r\niroute.route(req,res); \r\nif iroute.route match the request,it will return 1,else return 0;\r\n\r\nroutearray:\r\n\r\n  [\r\n    [{method}:{url}?{key1}&{key2},function(req,res){}]\r\n    ...\r\n  ]\r\n\r\n  example:\r\n\r\n      [\r\n\r\n      [\"get:/hello/world/?key1&key2\",function(req,res){  }]\r\n\r\n      ]\r\n\r\nnot_match_function:\r\nif iroute not match the request,the not_match_function will be called.It has two parameters,req and res.\r\nsupport: get,post,put,delete,options,head,other (other include copy,trace,lock.. etc)\r\n\r\nmore example see /example/example.js\r\n\r\n##expressjs example\r\n\r\n      var express = require('express');\r\n      var app = express();\r\n\r\n\r\n      var iroute = require(\"iroute\");\r\n      iroute.add([\r\n        [\"get:/hello/world\",function(req,res){res.end('hello world')}],\r\n      ])\r\n\r\n\r\n      app.use(function(req, res, next){\r\n        if(iroute.route(req,res)==1){\r\n          //match the url\r\n        }\r\n        else next();\r\n      });\r\n\r\n      app.listen(3000);\r\n","readmeFilename":"README.md","gypfile":true,"_id":"iroute@0.2.2","dist":{"shasum":"51a61ecb802f157e05a4073eed818bfbae954381","tarball":"https://registry.npmjs.org/iroute/-/iroute-0.2.2.tgz","integrity":"sha512-YSnAeJpxFCdbnfrSJj8eMAY4DjM5Z2g2TSWu3mY7HPtNVoo09KbKGEij+uEtygdnvV4QyMEkArZmyLIIZPS6AQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCAIwoLWuqBrtiob+snSQ3QvBjHUg7AKg/LCkA6xkLUswIhAM9SIQXcQG077dNafVvye0TzbOZ4qLuIYDnajSFO1Zgu"}]},"_from":".","_npmVersion":"1.2.24","_npmUser":{"name":"doublespout","email":"snoopyxdy@gmail.com"},"maintainers":[{"name":"doublespout","email":"snoopyxdy@gmail.com"}]},"0.2.3":{"name":"iroute","version":"0.2.3","main":"index.js","description":"High performance nodejs route with c++","keywords":["route","libuv","asynchronous","non-block"],"author":{"name":"doublespout","email":"snoopyxdy@163.com"},"homepage":"https://github.com/DoubleSpout/iroute","bugs":{"url":"https://github.com/DoubleSpout/iroute/issues","email":"snoopyxdy@163.com"},"repository":{"type":"git","url":"https://github.com/DoubleSpout/iroute.git"},"scripts":{"install":"node-gyp rebuild","test":"node ./test/main_test.js"},"os":["macos","linux","darwin","win32"],"engines":{"node":">=0.10.0"},"contributors":[{"name":"//iroute"},{"name":"2013-05-29 double spout","email":"snoopyxdy@163.com"}],"readme":"# iroute(fast and simple nodejs http/https router module) [![Build Status](https://travis-ci.org/DoubleSpout/iroute.png?branch=master)](https://travis-ci.org/DoubleSpout/iroute)\r\n\r\nif you only want to build a simple http server and don't want to use express,so iroute module could simple and fast to handler the request to action.\r\nthe module are also be used in flat.js framework.\r\n\r\n## Installing the module\r\n\r\nWith [npm](http://npmjs.org/):\r\n\r\niroute module is supported windows, linux, mac.\r\n\r\nMake sure, node-gyp has installed.\r\n\r\n     npm install iroute\r\n\r\nFrom source:\r\n\r\n     git clone https://github.com/DoubleSpout/iroute.git\r\n     cd iroute\r\n     node-gyp rebuild\r\n\r\nTo include the module in your project:\r\n\r\n     var iroute = require('iroute');\r\n\r\n##benchmark\r\n\r\nto run 1000 handler and match 10000 times,regexp match and iroute result is follow:\r\n\r\n      regexp: 1007ms\r\n      cb1 run times :10000\r\n      iroute: 251ms\r\n      cb2 run times :10000\r\n\r\nwow!!it's more than 3 times faster than regex match router.\r\n\r\n## example\r\n\r\n    var iroute = require('iroute')\r\n\r\n    iroute.add([\r\n\r\n      [\"get:/hello/world\",function(req,res){res.end('hello world')}],\r\n\r\n    ],function(req,res){\r\n\r\n        res.statusCode = 404;\r\n\r\n        res.end('404')\r\n\r\n    })\r\n\r\n    var http = require('http');\r\n\r\n    http.createServer(function (req, res) {\r\n\r\n      iroute.route(req,res);\r\n\r\n    }).listen(8124);\r\n\r\nthen request the 127.0.0.1:8124 you can see 'hello world'\r\n\r\n##API\r\n\r\niroute.add(routearray [,not_match_function]);\r\n\r\niroute.route(req,res); \r\nif iroute.route match the request,it will return 1,else return 0;\r\n\r\nroutearray:\r\n\r\n  [\r\n    [{method}:{url}?{key1}&{key2},function(req,res){}]\r\n    ...\r\n  ]\r\n\r\n  example:\r\n\r\n      [\r\n\r\n      [\"get:/hello/world/?key1&key2\",function(req,res){  }]\r\n\r\n      ]\r\n\r\nnot_match_function:\r\nif iroute not match the request,the not_match_function will be called.It has two parameters,req and res.\r\nsupport: get,post,put,delete,options,head,other (other include copy,trace,lock.. etc)\r\n\r\nmore example see /example/example.js\r\n\r\n##expressjs example\r\n\r\n      var express = require('express');\r\n      var app = express();\r\n\r\n\r\n      var iroute = require(\"iroute\");\r\n      iroute.add([\r\n        [\"get:/hello/world\",function(req,res){res.end('hello world')}],\r\n      ])\r\n\r\n\r\n      app.use(function(req, res, next){\r\n        if(iroute.route(req,res)==1){\r\n          //match the url\r\n        }\r\n        else next();\r\n      });\r\n\r\n      app.listen(3000);\r\n","readmeFilename":"README.md","gypfile":true,"_id":"iroute@0.2.3","dist":{"shasum":"20612a897250839e867808c53a2a519fdcf86666","tarball":"https://registry.npmjs.org/iroute/-/iroute-0.2.3.tgz","integrity":"sha512-/9zp906/xdyH+LhIw6ej3feaLFAxb46nKzNJYVRcKJlNYPjYFadwJH+SvYkE+GEp/nDzX7bop42Qu+7BP88Hvg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID11y8QCWu3/kXIvAogkBcTSrcHAZyTj3qu3HwXFIQOsAiEAzKFdh7lM7BkJ8JU+IgTjABAov6RFxxo0J7rmg0COTjk="}]},"_from":".","_npmVersion":"1.2.24","_npmUser":{"name":"doublespout","email":"snoopyxdy@gmail.com"},"maintainers":[{"name":"doublespout","email":"snoopyxdy@gmail.com"}]},"0.2.4":{"name":"iroute","version":"0.2.4","main":"index.js","description":"High performance nodejs route with c++","keywords":["route","libuv","asynchronous","non-block"],"author":{"name":"doublespout","email":"snoopyxdy@163.com"},"homepage":"https://github.com/DoubleSpout/iroute","bugs":{"url":"https://github.com/DoubleSpout/iroute/issues","email":"snoopyxdy@163.com"},"repository":{"type":"git","url":"https://github.com/DoubleSpout/iroute.git"},"scripts":{"install":"node-gyp rebuild","test":"node ./test/main_test.js"},"os":["macos","linux","darwin","win32"],"engines":{"node":">=0.10.0"},"contributors":[{"name":"//iroute"},{"name":"2013-05-29 double spout","email":"snoopyxdy@163.com"}],"readme":"# iroute(fast and simple nodejs http/https router module) [![Build Status](https://travis-ci.org/DoubleSpout/iroute.png?branch=master)](https://travis-ci.org/DoubleSpout/iroute)\r\n\r\nif you only want to build a simple http server and don't want to use express,so iroute module could simple and fast to handler the request to action.\r\nthe module are also be used in flat.js framework.\r\n\r\n## Installing the module\r\n\r\nWith [npm](http://npmjs.org/):\r\n\r\niroute module is supported windows, linux, mac.\r\n\r\nMake sure, node-gyp has installed.\r\n\r\n     npm install iroute\r\n\r\nFrom source:\r\n\r\n     git clone https://github.com/DoubleSpout/iroute.git\r\n     cd iroute\r\n     node-gyp rebuild\r\n\r\nTo include the module in your project:\r\n\r\n     var iroute = require('iroute');\r\n\r\n##benchmark\r\n\r\nto run 1000 handler and match 10000 times,regexp match and iroute result is follow:\r\n\r\n      regexp: 1007ms\r\n      cb1 run times :10000\r\n      iroute: 251ms\r\n      cb2 run times :10000\r\n\r\nwow!!it's more than 3 times faster than regex match router.\r\n\r\n## example\r\n\r\n    var iroute = require('iroute')\r\n\r\n    iroute.add([\r\n\r\n      [\"get:/hello/world\",function(req,res){res.end('hello world')}],\r\n\r\n    ],function(req,res){\r\n\r\n        res.statusCode = 404;\r\n\r\n        res.end('404')\r\n\r\n    })\r\n\r\n    var http = require('http');\r\n\r\n    http.createServer(function (req, res) {\r\n\r\n      iroute.route(req,res);\r\n\r\n    }).listen(8124);\r\n\r\nthen request the 127.0.0.1:8124 you can see 'hello world'\r\n\r\n##API\r\n\r\niroute.add(routearray [,not_match_function]);\r\n\r\niroute.route(req,res); \r\nif iroute.route match the request,it will return 1,else return 0;\r\n\r\nroutearray:\r\n\r\n  [\r\n    [{method}:{url}?{key1}&{key2},function(req,res){}]\r\n    ...\r\n  ]\r\n\r\n  example:\r\n\r\n      [\r\n\r\n      [\"get:/hello/world/?key1&key2\",function(req,res){  }]\r\n\r\n      ]\r\n\r\nnot_match_function:\r\nif iroute not match the request,the not_match_function will be called.It has two parameters,req and res.\r\nsupport: get,post,put,delete,options,head,other (other include copy,trace,lock.. etc)\r\n\r\nmore example see /example/example.js\r\n\r\n##expressjs example\r\n\r\n      var express = require('express');\r\n      var app = express();\r\n\r\n\r\n      var iroute = require(\"iroute\");\r\n      iroute.add([\r\n        [\"get:/hello/world\",function(req,res){res.end('hello world')}],\r\n      ])\r\n\r\n\r\n      app.use(function(req, res, next){\r\n        if(iroute.route(req,res)==1){\r\n          //match the url\r\n        }\r\n        else next();\r\n      });\r\n\r\n      app.listen(3000);\r\n","readmeFilename":"README.md","gypfile":true,"_id":"iroute@0.2.4","dist":{"shasum":"9cd92ec1720f06eb301b8192a601c3c8636c00c5","tarball":"https://registry.npmjs.org/iroute/-/iroute-0.2.4.tgz","integrity":"sha512-y6gbw8n5l6TlvC35QsENKp3dn7f3p4xqGJ4LYrq8iszhT2DOZLU3Uvl5kPAbsqzTSXbNTqOZNHK1fF4E4aADFg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwWzpluwmsW1lhHDHzPJs6MG97vYZjfljTyxsmsvZPvgIhAPyw4SNB7xR1g0zGLNGeEXjhOgpUgqhAW1wsxAahub1j"}]},"_from":".","_npmVersion":"1.2.24","_npmUser":{"name":"doublespout","email":"snoopyxdy@gmail.com"},"maintainers":[{"name":"doublespout","email":"snoopyxdy@gmail.com"}]},"0.3.0":{"name":"iroute","version":"0.3.0","main":"index.js","description":"High performance nodejs route with c++","keywords":["route","libuv","asynchronous","non-block"],"author":{"name":"doublespout","email":"snoopyxdy@163.com"},"homepage":"https://github.com/DoubleSpout/iroute","bugs":{"url":"https://github.com/DoubleSpout/iroute/issues","email":"snoopyxdy@163.com"},"repository":{"type":"git","url":"https://github.com/DoubleSpout/iroute.git"},"scripts":{"install":"node-gyp rebuild","test":"node ./test/main_test.js"},"os":["macos","linux","darwin","win32"],"engines":{"node":">=0.10.0"},"contributors":[{"name":"//iroute"},{"name":"2013-05-29 double spout","email":"snoopyxdy@163.com"}],"readme":"# iroute(fast and simple nodejs http/https router module) [![Build Status](https://travis-ci.org/DoubleSpout/iroute.png?branch=master)](https://travis-ci.org/DoubleSpout/iroute)\r\n\r\nif you only want to build a simple http server and don't want to use express,so iroute module could simple and fast to handler the request to action.\r\nthe module are also be used in flat.js framework.\r\n\r\n## Installing the module\r\n\r\nWith [npm](http://npmjs.org/):\r\n\r\niroute module is supported windows, linux, mac.\r\n\r\nMake sure, node-gyp has installed.\r\n\r\n     npm install iroute\r\n\r\nFrom source:\r\n\r\n     git clone https://github.com/DoubleSpout/iroute.git\r\n     cd iroute\r\n     node-gyp rebuild\r\n\r\nTo include the module in your project:\r\n\r\n     var iroute = require('iroute');\r\n\r\n##benchmark\r\n\r\nto run 1000 handler and match 10000 times,regexp match and iroute result is follow:\r\n\r\n      regexp: 1007ms\r\n      cb1 run times :10000\r\n      iroute: 251ms\r\n      cb2 run times :10000\r\n\r\nwow!!it's more than 3 times faster than regex match router.\r\n\r\n## example\r\n\r\n    var iroute = require('iroute')\r\n\r\n    iroute.add([\r\n\r\n      [\"get:/hello/world\",function(req,res){res.end('hello world')}],\r\n\r\n    ],function(req,res){\r\n\r\n        res.statusCode = 404;\r\n\r\n        res.end('404')\r\n\r\n    })\r\n\r\n    var http = require('http');\r\n\r\n    http.createServer(function (req, res) {\r\n\r\n      iroute.route(req,res);\r\n\r\n    }).listen(8124);\r\n\r\nthen request the 127.0.0.1:8124 you can see 'hello world'\r\n\r\n##API\r\n\r\niroute.add(routearray [,not_match_function]);\r\n\r\niroute.route(req,res); \r\nif iroute.route match the request,it will return 1,else return 0;\r\n\r\nroutearray:\r\n\r\n  [\r\n    [{method}:{url}?{key1}&{key2}, middle_function1, middle_function2, .., handle_function],\r\n    ...\r\n  ]\r\n\r\n  example:\r\n\r\n      [\r\n\r\n        [\"get:/hello/world/?key1&key2\", function middle1(req,res,ir_next){\r\n          req.ir_count = 0;\r\n          req.ir_count++;\r\n          ir_next()},\r\n        function middle2(req,res,ir_next){ req.ir_count++; process.nextTick(function(){ ir_next() }) },\r\n        function middle3(req,res,ir_next){ req.ir_count++; setTimeout(function(){ ir_next(); },2000) }, //Asynchronous is ok\r\n        function middle4(req,res,ir_next){ req.ir_count++; ir_next()},\r\n        function handle(req,res){\r\n          res.end( req.ir_count+''); //  req.ir_count will be 4!\r\n        }]\r\n\r\n      ]\r\n\r\nir_next([error]):\r\nif you don't call the function ir_next(),then will hang up the request,never responsed the rquest.so if you want to interrupt the routing, run the res.end() and never call the ir_next() or call the ir_next(\"some error\")  handle the request to the not_match_function;\r\nir_next() function has an optional param error,if ir_next(\"some error\");then will break the routing and call the not_match_function .it then setting the req.iroute_error = \"some error\";\r\n\r\nnot_match_function:\r\nif iroute not match the request,the not_match_function will be called.It has two parameters,req and res.\r\n\r\nsupport: get,post,put,delete,options,head,other (other include copy,trace,lock.. etc)\r\n\r\nmore example see /example/example.js\r\n\r\n##expressjs example\r\n\r\n      var express = require('express');\r\n      var app = express();\r\n\r\n\r\n      var iroute = require(\"iroute\");\r\n      iroute.add([\r\n        [\"get:/hello/world\",function(req,res){res.end('hello world')}],\r\n      ])\r\n\r\n\r\n      app.use(function(req, res, next){\r\n        if(iroute.route(req,res)==1){\r\n          //match the url\r\n        }\r\n        else next();\r\n      });\r\n\r\n      app.listen(3000);\r\n\r\n\r\n##benchmark to express and express+iroute\r\n\r\n      express only(1000 routes)\r\n      ab -c 100 -n 20000 http://192.168.28.5:8127/test/\r\n      Requests per second:    1271.83 [#/sec] (mean)\r\n\r\n      ab -c 500 -n 20000 http://192.168.28.5:8127/test/\r\n      Requests per second:    1237.43 [#/sec] (mean)\r\n\r\n      ab -c 800 -n 20000 http://192.168.28.5:8127/test/\r\n      Requests per second:    1191.17 [#/sec] (mean)\r\n\r\n\r\n\r\n      express+iroute (1000 routes)\r\n      ab -c 100 -n 20000 http://192.168.28.5:8128/test/\r\n      Requests per second:    1886.01 [#/sec] (mean)\r\n\r\n      ab -c 500 -n 20000 http://192.168.28.5:8128/test/\r\n      Requests per second:    1773.27 [#/sec] (mean)\r\n\r\n      ab -c 800 -n 20000 http://192.168.28.5:8128/test/\r\n      Requests per second:    1829.89 [#/sec] (mean)\r\n","readmeFilename":"README.md","gypfile":true,"_id":"iroute@0.3.0","dist":{"shasum":"3fceea3bb6a375c816ee8c90520416aa52dfe42d","tarball":"https://registry.npmjs.org/iroute/-/iroute-0.3.0.tgz","integrity":"sha512-x9qkqwg2nBUZJhC5hvQ6ZyLL8M+kmCd5GM74D+zrn06Mh3JEInZOkrFAMFhDYdAaKxmEkbgRXGuHgaUM7rP/1w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEgOYBp5CFcq6dzexSYDXIaKZyPFkQPD+XsDIYrj7CJZAiANoZC1LN+nvmWITqEKfZzfJbynqOQl8MtL1H9PYlFrEw=="}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"doublespout","email":"snoopyxdy@gmail.com"},"maintainers":[{"name":"doublespout","email":"snoopyxdy@gmail.com"}]},"0.3.1":{"name":"iroute","version":"0.3.1","main":"index.js","description":"High performance nodejs route with c++","keywords":["route","libuv","asynchronous","non-block"],"author":{"name":"doublespout","email":"snoopyxdy@163.com"},"homepage":"https://github.com/DoubleSpout/iroute","bugs":{"url":"https://github.com/DoubleSpout/iroute/issues","email":"snoopyxdy@163.com"},"repository":{"type":"git","url":"https://github.com/DoubleSpout/iroute.git"},"scripts":{"install":"node-gyp rebuild","test":"node ./test/main_test.js"},"os":["macos","linux","darwin","win32"],"engines":{"node":">=0.10.0"},"contributors":[{"name":"//iroute"},{"name":"2013-05-29 double spout","email":"snoopyxdy@163.com"}],"readme":"# iroute(fast and simple nodejs http/https router module) [![Build Status](https://travis-ci.org/DoubleSpout/iroute.png?branch=master)](https://travis-ci.org/DoubleSpout/iroute)\r\n\r\nif you only want to build a simple http server and don't want to use express,so iroute module could simple and fast to handler the request to action.\r\nthe module are also be used in flat.js framework.\r\n\r\n## Installing the module\r\n\r\nWith [npm](http://npmjs.org/):\r\n\r\niroute module is supported windows, linux, mac.\r\n\r\nMake sure, node-gyp has installed.\r\n\r\n     npm install iroute\r\n\r\nFrom source:\r\n\r\n     git clone https://github.com/DoubleSpout/iroute.git\r\n     cd iroute\r\n     node-gyp rebuild\r\n\r\nTo include the module in your project:\r\n\r\n     var iroute = require('iroute');\r\n\r\n##benchmark\r\n\r\nto run 1000 handler and match 10000 times,regexp match and iroute result is follow:\r\n\r\n      regexp: 1007ms\r\n      cb1 run times :10000\r\n      iroute: 251ms\r\n      cb2 run times :10000\r\n\r\nwow!!it's more than 3 times faster than regex match router.\r\n\r\n## example\r\n\r\n    var iroute = require('iroute')\r\n\r\n    iroute.add([\r\n\r\n      [\"get:/hello/world\",function(req,res){res.end('hello world')}],\r\n\r\n    ],function(req,res){\r\n\r\n        res.statusCode = 404;\r\n\r\n        res.end('404')\r\n\r\n    })\r\n\r\n    var http = require('http');\r\n\r\n    http.createServer(function (req, res) {\r\n\r\n      iroute.route(req,res);\r\n\r\n    }).listen(8124);\r\n\r\nthen request the 127.0.0.1:8124 you can see 'hello world'\r\n\r\n##API\r\n\r\niroute.add(routearray [,not_match_function]);\r\n\r\niroute.route(req,res); \r\nif iroute.route match the request,it will return 1,else return 0;\r\n\r\nroutearray:\r\n\r\n  [\r\n    [{method}:{url}?{key1}&{key2}, middle_function1, middle_function2, .., handle_function],\r\n    ...\r\n  ]\r\n\r\n  example:\r\n\r\n      [\r\n\r\n        [\"get:/hello/world/?key1&key2\", function middle1(req,res,ir_next){\r\n          req.ir_count = 0;\r\n          req.ir_count++;\r\n          ir_next()},\r\n        function middle2(req,res,ir_next){ req.ir_count++; process.nextTick(function(){ ir_next() }) },\r\n        function middle3(req,res,ir_next){ req.ir_count++; setTimeout(function(){ ir_next(); },2000) }, //Asynchronous is ok\r\n        function middle4(req,res,ir_next){ req.ir_count++; ir_next()},\r\n        function handle(req,res){\r\n          res.end( req.ir_count+''); //  req.ir_count will be 4!\r\n        }]\r\n\r\n      ]\r\n\r\nir_next([error]):\r\nif you don't call the function ir_next(),then will hang up the request,never responsed the rquest.so if you want to interrupt the routing, run the res.end() and never call the ir_next() or call the ir_next(\"some error\")  handle the request to the not_match_function;\r\nir_next() function has an optional param error,if ir_next(\"some error\");then will break the routing and call the not_match_function .it then setting the req.iroute_error = \"some error\";\r\n\r\nnot_match_function:\r\nif iroute not match the request,the not_match_function will be called.It has two parameters,req and res.\r\n\r\nsupport: get,post,put,delete,options,head,other (other include copy,trace,lock.. etc)\r\n\r\nmore example see /example/example.js\r\n\r\n##expressjs example\r\n\r\n      var express = require('express');\r\n      var app = express();\r\n      var iroute = require(\"iroute\");\r\n\r\n      var route_array = [\r\n        [\"get:/hello/world\",function(req,res){res.end('hello world')}],\r\n      ]\r\n\r\n      app.use(iroute.connect(route_array));\r\n\r\n      app.listen(3000);\r\n\r\n\r\n##benchmark to express and express+iroute\r\n\r\n      express only(1000 routes)\r\n      ab -c 100 -n 20000 http://192.168.28.5:8127/test/\r\n      Requests per second:    1271.83 [#/sec] (mean)\r\n\r\n      ab -c 500 -n 20000 http://192.168.28.5:8127/test/\r\n      Requests per second:    1237.43 [#/sec] (mean)\r\n\r\n      ab -c 800 -n 20000 http://192.168.28.5:8127/test/\r\n      Requests per second:    1191.17 [#/sec] (mean)\r\n\r\n\r\n\r\n      express+iroute (1000 routes)\r\n      ab -c 100 -n 20000 http://192.168.28.5:8128/test/\r\n      Requests per second:    1886.01 [#/sec] (mean)\r\n\r\n      ab -c 500 -n 20000 http://192.168.28.5:8128/test/\r\n      Requests per second:    1773.27 [#/sec] (mean)\r\n\r\n      ab -c 800 -n 20000 http://192.168.28.5:8128/test/\r\n      Requests per second:    1829.89 [#/sec] (mean)\r\n","readmeFilename":"README.md","gypfile":true,"_id":"iroute@0.3.1","dist":{"shasum":"a7c9af771f581bba265c6697786f53fb865a6309","tarball":"https://registry.npmjs.org/iroute/-/iroute-0.3.1.tgz","integrity":"sha512-aOTKge8a2tgLObkG2MTVsdN+lgoA3oGFqeFwgT3Q7LwswQ9USvqfKw1uqPh8i8x6GVh4sXyNrKbliglLjNnVjQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEM7oQpqTxoWWRE8ccvZe4ArkLSz4Bf29tFs1vulvSn8AiAThA7Aqf5bFxmQtn63gPWv9FPZHVGVH8RDBhPW68DwfQ=="}]},"_from":".","_npmVersion":"1.2.24","_npmUser":{"name":"doublespout","email":"snoopyxdy@gmail.com"},"maintainers":[{"name":"doublespout","email":"snoopyxdy@gmail.com"}]},"0.3.2":{"name":"iroute","version":"0.3.2","main":"index.js","description":"High performance nodejs route with c++","keywords":["route","libuv","asynchronous","non-block"],"author":{"name":"doublespout","email":"snoopyxdy@163.com"},"homepage":"https://github.com/DoubleSpout/iroute","bugs":{"url":"https://github.com/DoubleSpout/iroute/issues","email":"snoopyxdy@163.com"},"repository":{"type":"git","url":"https://github.com/DoubleSpout/iroute.git"},"scripts":{"install":"node-gyp rebuild","test":"node ./samples/test/main_test.js"},"os":["macos","linux","darwin","win32"],"engines":{"node":">=0.10.0"},"contributors":[{"name":"//iroute"},{"name":"2013-05-29 double spout","email":"snoopyxdy@163.com"}],"readme":"# iroute(fast and simple nodejs http/https router module) [![Build Status](https://travis-ci.org/DoubleSpout/iroute.png?branch=master)](https://travis-ci.org/DoubleSpout/iroute)\r\n\r\nif you only want to build a simple http server and don't want to use express,so iroute module could simple and fast to handler the request to action.\r\nthe module are also be used in flat.js framework.\r\n\r\n## Installing the module\r\n\r\nWith [npm](http://npmjs.org/):\r\n\r\niroute module is supported windows, linux, mac.\r\n\r\nMake sure, node-gyp has installed.\r\n\r\n     npm install iroute\r\n\r\nFrom source:\r\n\r\n     git clone https://github.com/DoubleSpout/iroute.git\r\n     cd iroute\r\n     node-gyp rebuild\r\n\r\nTo include the module in your project:\r\n\r\n     var iroute = require('iroute');\r\n\r\n##benchmark\r\n\r\nto run 1000 handler and match 10000 times,regexp match and iroute result is follow:\r\n\r\n      regexp: 1007ms\r\n      cb1 run times :10000\r\n      iroute: 251ms\r\n      cb2 run times :10000\r\n\r\nwow!!it's more than 3 times faster than regex match router.\r\n\r\n## example\r\n\r\n    var iroute = require('iroute')\r\n\r\n    iroute.add([\r\n\r\n      [\"get:/hello/world\",function(req,res){res.end('hello world')}],\r\n\r\n    ],function(req,res){\r\n\r\n        res.statusCode = 404;\r\n\r\n        res.end('404')\r\n\r\n    })\r\n\r\n    var http = require('http');\r\n\r\n    http.createServer(function (req, res) {\r\n\r\n      iroute.route(req,res);\r\n\r\n    }).listen(8124);\r\n\r\nthen request the 127.0.0.1:8124 you can see 'hello world'\r\n\r\n##API\r\n\r\niroute.add(routearray [,not_match_function]);\r\n\r\niroute.route(req,res); \r\nif iroute.route match the request,it will return 1,else return 0;\r\n\r\nroutearray:\r\n\r\n  [\r\n    [{method}:{url}?{key1}&{key2}, middle_function1, middle_function2, .., handle_function],\r\n    ...\r\n  ]\r\n\r\n  example:\r\n\r\n      [\r\n\r\n        [\"get:/hello/world/?key1&key2\", function middle1(req,res,ir_next){\r\n          req.ir_count = 0;\r\n          req.ir_count++;\r\n          ir_next()},\r\n        function middle2(req,res,ir_next){ req.ir_count++; process.nextTick(function(){ ir_next() }) },\r\n        function middle3(req,res,ir_next){ req.ir_count++; setTimeout(function(){ ir_next(); },2000) }, //Asynchronous is ok\r\n        function middle4(req,res,ir_next){ req.ir_count++; ir_next()},\r\n        function handle(req,res){\r\n          res.end( req.ir_count+''); //  req.ir_count will be 4!\r\n        }]\r\n\r\n      ]\r\n\r\nir_next([error]):\r\nif you don't call the function ir_next(),then will hang up the request,never responsed the rquest.so if you want to interrupt the routing, run the res.end() and never call the ir_next() or call the ir_next(\"some error\")  handle the request to the not_match_function;\r\nir_next() function has an optional param error,if ir_next(\"some error\");then will break the routing and call the not_match_function .it then setting the req.iroute_error = \"some error\";\r\n\r\nnot_match_function:\r\nif iroute not match the request,the not_match_function will be called.It has two parameters,req and res.\r\n\r\nsupport: get,post,put,delete,options,head,other (other include copy,trace,lock.. etc)\r\n\r\nmore example see /example/example.js\r\n\r\n##expressjs example\r\n\r\n      var express = require('express');\r\n      var app = express();\r\n      var iroute = require(\"iroute\");\r\n\r\n      var route_array = [\r\n        [\"get:/hello/world\",function(req,res){res.end('hello world')}],\r\n      ]\r\n\r\n      app.use(iroute.connect(route_array));\r\n\r\n      app.listen(3000);\r\n\r\n\r\n##benchmark to express and express+iroute\r\n\r\n      express only(1000 routes)\r\n      ab -c 100 -n 20000 http://192.168.28.5:8127/test/\r\n      Requests per second:    1271.83 [#/sec] (mean)\r\n\r\n      ab -c 500 -n 20000 http://192.168.28.5:8127/test/\r\n      Requests per second:    1237.43 [#/sec] (mean)\r\n\r\n      ab -c 800 -n 20000 http://192.168.28.5:8127/test/\r\n      Requests per second:    1191.17 [#/sec] (mean)\r\n\r\n\r\n\r\n      express+iroute (1000 routes)\r\n      ab -c 100 -n 20000 http://192.168.28.5:8128/test/\r\n      Requests per second:    1886.01 [#/sec] (mean)\r\n\r\n      ab -c 500 -n 20000 http://192.168.28.5:8128/test/\r\n      Requests per second:    1773.27 [#/sec] (mean)\r\n\r\n      ab -c 800 -n 20000 http://192.168.28.5:8128/test/\r\n      Requests per second:    1829.89 [#/sec] (mean)\r\n","readmeFilename":"README.md","gypfile":true,"_id":"iroute@0.3.2","dist":{"shasum":"427da244540752825abc347726f0c86f20172050","tarball":"https://registry.npmjs.org/iroute/-/iroute-0.3.2.tgz","integrity":"sha512-g0tlEFP5tqjrQ71s9fAkdKwayf8z/xwHzEqUdOJqJBhbRkH9TEiVlRaRfeV4rLn/HuqAb7/jyJZLAjQaGPjGTg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1YXaZRbZByh1190KLx81oA5R9G0GxeszVckAHsiaOJQIgMbNGYO7TaucbWqlvaEJv73l1DX5ZD/RaUIjfJ73yrlA="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"doublespout","email":"snoopyxdy@gmail.com"},"maintainers":[{"name":"doublespout","email":"snoopyxdy@gmail.com"}]}},"readme":"ERROR: No README.md file found!","maintainers":[{"name":"doublespout","email":"snoopyxdy@gmail.com"}],"time":{"modified":"2022-06-19T02:35:08.990Z","created":"2013-05-29T02:46:25.129Z","0.1.0":"2013-05-29T02:46:28.206Z","0.1.1":"2013-06-04T08:31:06.256Z","0.1.2":"2013-06-04T08:34:03.014Z","0.1.5":"2013-06-04T11:37:52.718Z","0.1.6":"2013-06-04T14:09:51.863Z","0.1.7":"2013-06-04T14:20:08.464Z","0.1.9":"2013-06-04T16:35:12.795Z","0.2.0":"2013-06-04T17:02:19.647Z","0.2.1":"2013-06-05T03:05:51.320Z","0.2.2":"2013-06-05T04:47:13.759Z","0.2.3":"2013-06-06T01:33:58.192Z","0.2.4":"2013-06-06T08:44:44.994Z","0.3.0":"2013-06-23T04:15:13.910Z","0.3.1":"2013-06-24T05:57:25.176Z","0.3.2":"2013-12-13T14:36:40.000Z"},"author":{"name":"doublespout","email":"snoopyxdy@163.com"},"repository":{"type":"git","url":"https://github.com/DoubleSpout/iroute.git"}}