Closed misterjt closed 11 years ago
The router was designed for use with the standard REST actions. While you could mangle it to fit this scheme, I certainly don't recommend it!
The router is not intended to serve static assets - you should either use a static file library like node static or let nginx serve the stati assets for you.
You are impose to use different methods on different actions. I dont like this way. If i want to add a post to my blog i will use next way
/blog?action=create
Please, make method argument not required.And one more issue. I think i found a safety hole in your router. I usualy require CSS and JS files in my HTML according to URL. So i'm making route
And i get
js
key in objectparams
. BUT if user make next URL/blog?js=pathToBanner.js
Will i get this inparams
?