微信搜索“毛凌志岗前心得”小程序
Connect - High quality middleware for node.js
ConnectConnect is a middleware framework for node,shipping with over 18 bundled middleware and a rich selection of3rd-party middleware.var app = connect() .use(connect.logger('dev')) .use(connect.static('public')) .use(function(req, res){ res.end('hello world\n'); }) .listen(3000); Installation$ npm install connect Middlewarelogger request logger with custom format supportcsrf Cross-site request forgery protectioncompress Gzip compression middlewarebasicAuth basic http authenticationbodyParser extensible request body parserjson application/json parserurlencoded application/x-www-form-urlencoded parsermultipart multipart/form-data parsercookieParser cookie parsersession session management support with bundled MemoryStorecookieSession cookie-based session supportmethodOverride faux HTTP method supportresponseTime calculates response-time and exposes via X-Response-TimestaticCache memory cache layer for the static() middlewarestatic streaming static file server supporting Range and moredirectory directory listing middlewarevhost virtual host sub-domain mapping middlewarefavicon efficient favicon server (with default icon)limit limit the bytesize of request bodiesquery automatic querystring parser, populating req.queryerrorHandler flexible error handlerInternalsserver prototypeconnect utilitiesnode monkey patchesLinkslist of 3rd-party middlewareGitHub repositorytest documentation
Connect is a middleware framework for node,shipping with over 18 bundled middleware and a rich selection of3rd-party middleware.
var app = connect() .use(connect.logger('dev')) .use(connect.static('public')) .use(function(req, res){ res.end('hello world\n'); }) .listen(3000);
$ npm install connect
Range
req.query
Copyright @ 2024 lexus Powered by .NET 8.0 on Kubernetes Powered by: .Text and ASP.NET Theme by: .NET Monster
Connect is a middleware framework for node,
shipping with over 18 bundled middleware and a rich selection of
3rd-party middleware.
Installation
Middleware
Range
and morereq.query
Internals
Links