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

本文涉及的产品
Serverless 应用引擎免费试用套餐包,4320000 CU,有效期3个月
性能测试 PTS,5000VUM额度
云原生网关 MSE Higress,422元/月
简介:   这篇文章与大家分享优秀的 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 记住啦:)
欢迎任何形式的转载,但请务必注明出处。

相关文章
|
4天前
|
Web App开发 存储 JavaScript
深入浅出Node.js后端开发
【10月更文挑战第31天】本文将引导你进入Node.js的奇妙世界,探索其如何革新后端开发。通过浅显易懂的语言和实际代码示例,我们将一起学习Node.js的核心概念、搭建开发环境,以及实现一个简单但完整的Web应用。无论你是编程新手还是希望拓展技术的开发者,这篇文章都将为你打开一扇通往高效后端开发的大门。
|
4天前
|
Web App开发 JavaScript 前端开发
深入浅出Node.js后端开发
【10月更文挑战第30天】本文将通过一个Node.js的简单示例,引导你进入Node.js的世界。我们将从基础概念讲起,然后一步步深入到代码实现,最后总结Node.js在后端开发中的优势和应用场景。无论你是前端开发者还是后端新手,这篇文章都将为你打开一扇了解Node.js的大门。
15 2
|
7天前
|
JavaScript 中间件 API
Node.js进阶:Koa框架下的RESTful API设计与实现
【10月更文挑战第28天】本文介绍了如何在Koa框架下设计与实现RESTful API。首先概述了Koa框架的特点,接着讲解了RESTful API的设计原则,包括无状态和统一接口。最后,通过一个简单的博客系统示例,详细展示了如何使用Koa和koa-router实现常见的CRUD操作,包括获取、创建、更新和删除文章。
26 3
|
7天前
|
消息中间件 NoSQL Java
springboot整合常用中间件框架案例
该项目是Spring Boot集成整合案例,涵盖多种中间件的使用示例,每个案例项目使用最小依赖,便于直接应用到自己的项目中。包括MyBatis、Redis、MongoDB、MQ、ES等的整合示例。
53 1
|
13天前
|
JavaScript 前端开发 持续交付
构建现代Web应用:Vue.js与Node.js的完美结合
【10月更文挑战第22天】随着互联网技术的快速发展,Web应用已经成为了人们日常生活和工作的重要组成部分。前端技术和后端技术的不断创新,为Web应用的构建提供了更多可能。在本篇文章中,我们将探讨Vue.js和Node.js这两大热门技术如何完美结合,构建现代Web应用。
17 4
|
14天前
|
Web App开发 JavaScript 中间件
构建高效后端服务:Node.js与Express框架的完美结合
【10月更文挑战第21天】本文将引导你走进Node.js和Express框架的世界,探索它们如何共同打造一个高效、可扩展的后端服务。通过深入浅出的解释和实际代码示例,我们将一起理解这一组合的魅力所在,并学习如何利用它们来构建现代Web应用。
38 1
|
2天前
|
Web App开发 JavaScript 前端开发
探索后端开发:Node.js与Express的完美结合
【10月更文挑战第33天】本文将带领读者深入了解Node.js和Express的强强联手,通过实际案例揭示它们如何简化后端开发流程,提升应用性能。我们将一起探索这两个技术的核心概念、优势以及它们如何共同作用于现代Web开发中。准备好,让我们一起开启这场技术之旅!
|
2天前
|
Web App开发 JavaScript 前端开发
构建高效后端服务:Node.js与Express框架的实践
【10月更文挑战第33天】在数字化时代的浪潮中,后端服务的效率和可靠性成为企业竞争的关键。本文将深入探讨如何利用Node.js和Express框架构建高效且易于维护的后端服务。通过实践案例和代码示例,我们将揭示这一组合如何简化开发流程、优化性能,并提升用户体验。无论你是初学者还是有经验的开发者,这篇文章都将为你提供宝贵的见解和实用技巧。
|
3天前
|
Web App开发 JavaScript 中间件
构建高效后端服务:Node.js与Express框架的融合之道
【10月更文挑战第31天】在追求快速、灵活和高效的后端开发领域,Node.js与Express框架的结合如同咖啡遇见了奶油——完美融合。本文将带你探索这一组合如何让后端服务搭建变得既轻松又充满乐趣,同时确保你的应用能够以光速运行。
8 0
|
8天前
|
JavaScript 前端开发 安全
深入浅出Node.js后端开发
【10月更文挑战第26天】在这篇文章中,我们将一起探索Node.js的奇妙世界。不同于传统的Java或Python,Node.js以其异步非阻塞I/O和事件驱动的特性,在后端开发领域独树一帜。无论你是初学者还是资深开发者,这篇文章都将为你提供新的视角和思考。从基础概念到实际应用,我们一步步深入Node.js的世界,让你了解其不仅仅是JavaScript运行环境那么简单。