Simple REST
Simple REST framework.
This is alpha version, API may change drastically with major versions. Performance is probably bad.
Installation
npm install simple-rest
Usage
rest = ; // Example// If you return string response gets Content-Type: text/plain automatically.rest; // Automatic variable name mapping (order of arguments in function doesn't matter)// e.g. /user/1/name --> 1, namerest; // chainingrest // if you return simple object then the response // has Content-Type: application/json automatically // automatic setting Content-Type via function name // POST // file download? no problem! // auto-wire core module? not a problem! // asynchronous version of above // Note: if Async is injected then framework automatically assumes // asynchronous callback will be called and ignores return // value of handler. ;