Open kennethkoontz opened 12 years ago
I'd like to change the implementation for routing, rather then using an object; I'd like to use an array. There are constraints with using the object approach and looking up by key, if the key is regex.
var routes = module.exports = [ ['/^regex', 'blah'], ['another/regex', 'foobar'], ['another/:id', 'blaggle'] ]
Right now, mold routing doesn't parse the url for parameters. It takes a static string and maps that directly to a single action. It would be useful to parse the url and extract the parameters, passing it into an action.
So we could do something like.
in routes.js:
in actions.js: