Node.js Web 开发框架大全《中间件篇》

本文涉及的产品
服务治理 MSE Sentinel/OpenSergo,Agent数量 不受限
简介:   这篇文章与大家分享优秀的 Node.js 中间件模块。Node 是一个服务器端 JavaScript 解释器,它将改变服务器应该如何工作的概念。它的目标是帮助程序员构建高度可伸缩的应用程序,编写能够处理数万条同时连接到一个(只有一个)物理机的连接代码。

  这篇文章与大家分享优秀的 Node.js 中间件模块。Node 是一个服务器端 JavaScript 解释器,它将改变服务器应该如何工作的概念。它的目标是帮助程序员构建高度可伸缩的应用程序,编写能够处理数万条同时连接到一个(只有一个)物理机的连接代码。

您可能感兴趣的相关文章

 

JSGI

  • commonlogger - A logger of HTTP requests.
  • compact - Join and compress frontend javascript.
  • compress - Gzip compresses (using node-compress) the response when appropriate based on request headers.
  • conditional - Handles conditional HTTP requests (If-Modified-Since, etc.)
  • contentlength - Sets Content-Length header.
  • csrf - Checks HTTP request for possible cross-site request forgery, flags dangerous requests.
  • extension - Transforms .extension to a RESTful Accept header
  • head - Handles HEAD requests (stripping body).
  • http-params - Converts HTTP parameters http- to headers.
  • media - Performs content type negotiation (per RFC2616) delegating to appropriate media handler.
  • redirect - Redirects to other URLs
  • rewriter - Rewrites defined paths to other paths.
  • routes - Simple RegExp based router
  • session - Session manager with pluggable storage handling
  • static - Static file handler using asynchronous streaming.
  • transporter - Share modules with browser, works RequireJS and Yabble
  • urlmap - Maps to different apps by path/URL
  • xsite - Handles JSONP, window.name, and cross-origin XHR (CORS).

Connect

  • connect-jade-static - Serving jade files as static html
  • aspa-express - Simple, dependency-free middleware for serving assets packaged with aspa.
  • browserify-middleware - Middleware for serving up node.js code with requires to the client.
  • bundle-up — A simple asset manager middleware for managing css and js files.
  • client-certificate-auth - Basic TLS/SSL client certificate authentication
  • connect_facebook - Facebook session support for Connect
  • connect_json - Support for parsing JSON requests and sending JSON responses in Connect
  • connect-airbrake — Airbrake error reporting auto-setup middleware
  • connect-assetmanager - Asset manager for Connect for handling CSS/JS files
  • connect-assets - Compiled CSS/JS asset pipeline inspired by Rails 3.1
  • connect-auth — Connect authentication middleware, provides out-of-the-box implementations of HTTP (Basic & Digest), Twitter, Facebook, BitBucket, Janrain, Yahoo, Sina, Google, OAuth (1.0 server), Github and a couple of others....
  • connect-compiler — Development middleware to dynamically recompile derived files at serve-time.
  • connect-dojo — Connect middleware exposing the Dojo Toolkit
  • connect-domain — Asynchronous error handler for Connect
  • connect-force-domain — force all visitors onto a single domain
  • connect-gridfs — GridFS file server for Connect
  • connect-http-signature — middleware wrapper for Joyent's HTTP Signature reference implementation
  • connect-proxy — Retrieve originating ip/host values when proxying to your connect app
  • connect-roles — Dynamic roles based authorization for connect/express, designed to work well with passport and everyauth.
  • connect-rpx - Use RPX with Node.js and Connect
  • cookie-sessions — Secure cookie-based session store
  • dispatch — Regular expression URL dispatcher
  • everyauth — Connect authentication and authorization middleware, modular, configurable, supporting password, OpenId, Google, OAuth, Twitter, LinkedIn, Yahoo, Readability, Dropbox, Justin.tv, Vimeo, Tumblr, OAuth2, Facebook, GitHub, Instagram, Foursquare, Box.net, LDAP
  • express-chromeframe — Dead simple middleware to enable chromeframe on connect/express applications.
  • express-errors — Simple error handling
  • facebook-wrapper — Basic wrapper to the Facebook API, designed to work with Connect and Express
  • form2json — Decoder for form-urlencoded data that supports arrays of nested objects
  • formaline - full-featured module for handling form POSTs/PUTs (multipart/form-data, application/x-www-form-urlencoded ) and fast parsing of file uploads, it speaks JSON and it is also ready for use with middlewares like connect.
  • http-accept — Connect compatible middleware that parses HTTP Accept header fields
  • merge-js — Simple connect middleware for merging multiple js files and uglifying the result.
  • mincer — direct Sprockets assets manager port, with middleware for connect/express
  • minj — Serve minified javascript files with Connect/Express
  • monomi — Provides tools for handling tablet, touch, and mobile browsers
  • node_signedcookies — Extends Express's cookieParser() to read/write signed cookies.
  • node-facebook-session-cookie — eats facebook cookies from client FB.login() and makes the session available as req.fb_session
  • passport — Simple, modular, and unobtrusive authentication framework for Connect and Express.
  • pound — Pound is an high-level interface for Piler - The Awesome Asset Manager for Node.js
  • quip — Chainable HTTP response API
  • resource-router — A resource-oriented router to replace the default routing in express
  • resty — Quickly and simply build REST APIs with this connect middleware
  • session-web-sockets — Pass session to (Socket.IO-node) in a secure manner. Originally forked from bmeck/session-web-sockets
  • session.js — super simple session middleware for node.js, even has optional "magic" sessions which monkey patch the httpServer with one line!
  • Shrinkroute - Named routes for Express. Helps you in achieving DRY routes!
  • trust-reverse-proxy - Trust (SSL) connections coming from (a) specific reverse prox(y)(ies)

Other middleware

  • bouncy — bounce HTTP requests around for load balancing or as an HTTP host router
  • buffet — Performance-oriented static file server & middleware
  • dota2api — Dota2 api wrapper written in node.js
  • eventpipe — Provides an Event Pipe with the same API as node.js' EventEmitter
  • exedra — Express routes & functions loader
  • express-debug — Express middleware that provides a debugging/object browser panel injected into your application.
  • express-couch-proxy — CouchDB reverse proxy middleware for Express
  • express-twitter — Twitter-specific OAuth support
  • googleclientlogin — Log in to Google services using CllientLogin method
  • http-auth — Node.js package for HTTP basic and digest access authentication.
    • htdigest — Node.js package for HTTP Digest Authentication password file utility.
    • htpasswd — Node.js package for HTTP Basic Authentication password file utility.
  • http-auth2 — HTTP basic authentication that supports multiple logins.
  • http-proxy-selective — Proxy server replace some remote static files with local ones
  • middler — A middleware runner which can itself function as middleware, with routing
  • node-evented — Extended EventEmitter
  • node-file-cache - Very small file cache for node.js http server.
  • node-force-domain — Force multiple domains to redirect (301) to a default one in your Express project.
  • Node-Http-Rewrite-Proxy — This module proxies and rewrites HTTP requests of all types. For this you can, if you want, use regular expressions.
  • node-reverse-proxy — A reverse proxy which forwards incoming HTTP requests to multiple back-end HTTP servers based upon HTTP Host header.
  • node-varnish — Connector for the Varnish cache telnet management protocol
  • notp — NodeJS One Time Password authentication, compatible with Google Authenticator
  • onion — Simple and flexible middleware stack that enables you to add a middleware layer to just about anything
  • protobuf_for_node — In-process JS-to-C++ communication using protocol buffer services
    • protobuf — A fork of protobuf_for_node with an npm package.
  • proxy-tamper — A proxy server that allows for the tampering of requests and responses.
  • socket-logger — JSON-parsable logs for Socket.IO that can push log messages to a client over Socket.IO.
  • subproxy - subdomain proxy (for example to proxy www.google.com with www.google.com.localhost)
  • proxima - HTTP/TLS(HTTPS) reverse proxy forwards incoming requests to upstream servers based on Host header or SNI host hint.
  • express-cors - Simple middleware for adding CORS functionality to your expressjs app.

 

您可能感兴趣的相关文章

 

本文来源:Node.js 入门手册:Web 框架大全《中间件篇》

编译来源:梦想天空 ◆ 关注前端开发技术 ◆ 分享网页设计资源

作者:山边小溪
主站:yyyweb.com 记住啦:)
欢迎任何形式的转载,但请务必注明出处。

相关文章
|
1天前
|
缓存 监控 安全
Django框架在大型Web应用中的架构设计与实战
【5月更文挑战第18天】Django框架在构建大型Web应用中扮演重要角色,采用分层架构(数据、业务逻辑、表示层)和多应用组织模式,结合缓存策略(如Memcached、Redis)提升性能。通过异步处理、分布式部署提高响应速度和扩展性。关注数据分区、安全设计及监控日志,确保系统高效、稳定。Django为复杂业务提供坚实基础,助力打造卓越Web系统。
18 7
|
1天前
|
开发框架 中间件 数据库
Django 框架入门全攻略:轻松构建 Web 应用
【5月更文挑战第18天】本文是 Django 入门教程,介绍了如何使用 Django 构建 Web 应用。内容包括安装、项目与应用创建、模型定义、数据库迁移、视图编写、路由配置、模板系统、表单处理和中间件的使用。通过实例展示了 Django 基本流程,帮助初学者快速上手。Django 提供高效工具,便于开发者聚焦业务逻辑,轻松构建功能丰富的 Web 应用。
16 5
|
1天前
|
存储 缓存 API
Flask 框架在大型 Web 应用中的使用与挑战
【5月更文挑战第18天】Flask框架适用于快速开发轻量级Web应用,但用于大型应用时需应对性能、代码管理和团队协作的挑战。通过集成扩展处理复杂需求,使用蓝图组织代码,以及引入缓存优化性能,结合明确的代码规范和开发流程,可有效应对挑战,构建高效稳定的应用。
15 5
|
1天前
|
数据库连接 Python
Flask 框架入门与实践:构建你的第一个 Web 应用
【5月更文挑战第18天】本文介绍了使用 Flask 框架构建第一个 Web 应用的步骤。首先通过 `pip install Flask` 安装框架,然后编写基本的 Python 代码创建应用,包括定义路由和响应。示例展示如何显示 "Hello, World!",并扩展到显示用户信息的功能。利用模板(如 `index.html`)可使页面更丰富。随着学习深入,可以利用 Flask 的更多特性,如表单处理和数据库连接,来构建更复杂的 Web 应用。本文旨在激发读者对 Flask 和 Web 开发的兴趣,鼓励不断探索和实践。
15 7
|
2天前
|
JavaScript
js中如何使用工厂方式和构造函数创建对象,web开发项目实例
js中如何使用工厂方式和构造函数创建对象,web开发项目实例
|
4天前
|
JSON JavaScript API
使用 Node.js 开发一个简单的 web 服务器响应 HTTP post 请求
使用 Node.js 开发一个简单的 web 服务器响应 HTTP post 请求
11 1
|
4天前
|
JSON JavaScript 中间件
使用 Node.js 开发一个简单的 web 服务器响应 HTTP get 请求
使用 Node.js 开发一个简单的 web 服务器响应 HTTP get 请求
9 2
|
4天前
|
JavaScript 前端开发 API
在Node.js上使用dojo库进行面向对象web应用开发
请注意,虽然这个例子在Node.js环境中使用了Dojo,但Dojo的许多功能(例如DOM操作和AJAX请求)在Node.js环境中可能无法正常工作。因此,如果你打算在Node.js环境中使用Dojo,你可能需要查找一些适用于服务器端JavaScript的替代方案。
12 0
|
3天前
|
存储 安全 前端开发
第五章 跨域资源共享(CORS):现代Web开发中的关键机制
第五章 跨域资源共享(CORS):现代Web开发中的关键机制
|
4天前
|
设计模式 开发框架 数据库
Python Web开发主要常用的框架
【5月更文挑战第12天】Python Web开发框架包括Django、Flask、Tornado和Pyramid。Django适用于复杂应用,提供ORM、模板引擎等全套功能;Flask轻量级,易于扩展,适合小型至中型项目;Tornado擅长处理高并发,支持异步和WebSockets;Pyramid灵活强大,可适配多种数据库和模板引擎,适用于各种规模项目。选择框架需依据项目需求和技术栈。
122 2