Caution
This repository is archived and no longer actively maintained.
We are no longer accepting issues, feature requests, or pull requests. For additional support or questions, please visit the Express.js Discussions page.
Thin wrapper around path-to-regexp to make extracting the param names easier.
var route = require('path-match')({ // path-to-regexp options sensitive: false, strict: false, end: false, }); // create a match function from a route var match = route('/post/:id'); // match a route var parse = require('url').parse; require('http').createServer(function (req, res) { var params = match(parse(req.url).pathname); // no match if (params === false) { res.statusCode = 404; res.end(); return; } // the matched id var id = params.id; // do stuff with the ID })
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4