Request/response utilities bundled into middleware
__req__ueste d __res__ponse
reqdres is a set of utilities that extend
response bundled into a piece of connect middleware
Currently only contains
npm install reqdres
var connect = require"connect";var reqdres = require"reqdres";var app = connect;appuseredresdir: __dirname+"/views" // the directory to look for viewsext: ".jade" // the view extensiontemplate: jade__express // mostly express compatable (currently no support for extends);appuse// don't actually work all at once like thisressendsome: "json" 200; // status code optional, defaults to 200ressendFile"./test.txt"; // streams a fileresrender"index" foo: "bar"// this callback and the locals object are optional; // renders views/index.jade
The MIT License (MIT)
Copyright (c) 2013 James A. Eschrich
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.