Node.js Web 開發框架大全《中間件篇》

  這篇文章與大家分享優秀的 Node.js 中間件模塊。Node 是一個服務器端 JavaScript 解釋器,它將改變服務器應該如何工作的概念。它的目標是幫助程序員構建高度可伸縮的應用程序,編寫能夠處理數萬條同時連接到一個(只有一個)物理機的連接代碼。

您可能感興趣的相關文章

  • 10大流行的 Metro UI 風格 Bootstrap 主題
  • 推薦35款精致的 CSS3 和 HTML5 網頁模板
  • 讓人愛不釋手的精美 Web 應用程序圖標素材
  • 贊!10套精美的免費網站后臺管理系統模板
  • 精選12款優秀 jQuery Ajax 分頁插件和教程

?

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.

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/249165.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/249165.shtml
英文地址,請注明出處:http://en.pswp.cn/news/249165.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

windows server 2012 流媒體服務器搭建(直播與點播)

IIS Live Smooth Streaming(實時平滑流式處理)是微軟下一代流媒體解決方案。該技術是在IIS web中集成媒體傳輸平臺IIS media services,實現利用標準 HTTP Web 技術以及高級 Silverlight 功能,確保在互聯上傳輸質量最佳、播放流暢音…

團隊項目第一篇——NABCD

團隊名稱:筑夢之舟 團隊項目名稱:跑跑 N(Need)需求: 有許多人在跑步時想了解自己的移動軌跡和跑步距離很不便利,無法了解跑步的日程,我們的軟件就是為了更加方便熱愛跑步的人能夠參加到跑步之中…

Vue warn Failed to mount component: template or render function not defined

問題如圖,造成這類的問題一般有這么幾個原因。 代碼的拼寫問題,當然這是最低級的錯誤vue定義的問題,這里我說明兩點 在組件內部定義組件時,template 對應的必須是html字符串引用外部組件時,vue文件必須以template標簽…

Python實現線性回歸2,梯度下降算法

接上篇 4.梯度下降算法 《斯坦福大學公開課 :機器學習課程》吳恩達講解第二課時,是直接從梯度下降開始講解,最后采用向量和矩陣的方式推導了解析解,國內很多培訓視頻是先講解析解后講梯度下降,個人認為梯度下降算法更為…

在centos和redhat上安裝docker

前置條件 64-bit 系統kernel 3.101.檢查內核版本,返回的值大于3.10即可。$ uname -r 2.使用 sudo 或 root 權限的用戶登入終端。 3.卸載舊版本(如果安裝過舊版本的話) $ yum remove docker \docker-common \docker-selinux \docker-engine 4.安裝需要的軟件包 #yum-…

mac 下用 brew 安裝mongodb

mac 下安裝mongoDB一般倆種方法. (1)下載源碼,解壓,編譯,配置,啟動 比較艱難的一種模式. (2)brew install mongodb ,然后就可以悠閑的品一口茶,順便瞄一眼網易新聞,這是一種傻瓜模式. 但傻瓜模式也有人為干預的時候,粗略說一下使用brew 安裝mongodb 1 zhangzhimoke:~/code$…

比較python類的兩個instance(對象) 是否相等

http://www.yihaomen.com/article/python/281.htm 比較python類的兩個instance(對象) 是否相等 作者:輕舞肥羊 日期:2012-10-25 字體大小: 小 中 大對于同一個Class,可以創建不同的實例(instance), 如何比較這兩個 instance 是否相等呢?我們知道,對于計算…

Mybaits插入記錄返回主鍵值

某些情況進行insert時不知道主鍵值(主鍵為自增),例如系統新增用戶時,有用戶序號(主鍵 自增),用戶名,密碼。插入時只需插入用戶名和密碼,之后取得mysql自增的序號。 如下為…

Mac 解決brew一直卡在Updating Homebrew

運行命令brew install node,結果界面一直卡在Updating Homebrew...上,有兩種解決辦法 方法一:直接關閉brew每次執行命令時的自動更新(推薦) vim ~/.bash_profile# 新增一行 export HOMEBREW_NO_AUTO_UPDATEtrue方法二…

CAS單點登錄原理簡單介紹

1. SSO簡介 1.1 單點登錄定義 單點登錄(Single sign on),英文名稱縮寫SSO,SSO的意思就是在多系統的環境中,登錄單方系統,就可以在不用再次登錄的情況下訪問相關受信任的系統。也就是說只要登錄一次單體系統就可以。計劃在項目中加…

前端跨域通信的幾種方式

前言 前端通信類的問題,主要包括以下內容: 1、什么是同源策略及限制 同源策略是一個概念,就一句話。有什么限制,就三句話。能說出來即可。 2、前后端如何通信 如果你不準備,估計也就只能說出ajax。 3、如何創建Aja…

T4((Text Template Transformation Toolkit))模版引擎之基礎入門 C#中文本模板(.tt)的應用...

1 關于C#中文本模板(.tt)的簡單應用https://blog.csdn.net/zunguitiancheng/article/details/78011145 任何一個傻瓜都能寫出計算機能理解的程序,而優秀的程序員卻能寫出別人能讀得懂的程序。—— Martin Fowler 2 T4模版引擎之生成數據庫實體類 http://www.cnblogs…

LeetCode412Fizz Buzz

寫一個程序,輸出從 1 到 n 數字的字符串表示。 1. 如果 n 是3的倍數,輸出“Fizz”; 2. 如果 n 是5的倍數,輸出“Buzz”; 3.如果 n 同時是3和5的倍數,輸出 “FizzBuzz”。 示例: n 15, 返回: [ …

vue+node實現中間層同步調用接口

為了應對業務的復雜性,提高前端的渲染能力,故在項目中引入nodejs做中間層,前端承接vue,后端對接Java。 至于為什么這么搞,網上有好多文章都在討論,可以說仁者見仁智者見智,這里我們不在深究。 …

ES6學習筆記(二十二)ArrayBuffer

ArrayBuffer ArrayBuffer對象、TypedArray視圖和DataView視圖是 JavaScript 操作二進制數據的一個接口。它們都是以數組的語法處理二進制數據,所以統稱為二進制數組。 二進制數組由三類對象組成。 (1)ArrayBuffer對象: 代表內存之…

如何正確地使用Java的@deprecated標注

沒有什么事情比看到一個沒有任何說明的deprecated標注更讓人憤怒的事情了。這種做法只能讓人困惑,我到底還要不要用這個已經‘廢棄’的方法?如果開發者不希望某個方法再被人用的話,就要好好地為deprecated標注寫說明。這篇文章就討論了正確地…

實現div里的img圖片水平垂直居中

body結構 <body><div><img src"1.jpg" alt"haha"></div> </body>方法一&#xff1a; 將display設置成table-cell&#xff0c;然后水平居中設置text-align為center&#xff0c;垂直居中設置vertical-align為middle。 <…

[ 懶人神器 ] —— OO一鍵build:.zip - .jar

懶人神器 更新 大家注意一下&#xff0c;由于在寫入MANIFEST的時候&#xff0c;Class-Path路徑給的是 ../lib &#xff0c;即上級目錄的lib。 所以在對拍時如果手動移動了 jar包的位置&#xff0c;需要保證 lib/ 文件夾在存放jar包的上一級目錄下&#xff0c;否則在運行時會報錯…

實現Datagrid分頁

Html頁面&#xff1a; <!DOCTYPE html> <html> <head><meta http-equiv"Content-Type" content"text/html; charsetutf-8" /><title></title><meta charset"utf-8" /><!-- 引入相關CSS --><…

Luogu 3698 [CQOI2017]小Q的棋盤

BZOJ 4813 雖然數據范圍很迷人&#xff0c;但是想樹形$dp$沒有前途。 先發現一個事情&#xff0c;就是我們可以先選擇一條鏈&#xff0c;最后要走到這一條鏈上不回來&#xff0c;走到鏈上的點每一個只需要一步&#xff0c;而如果要走這條鏈之外的點&#xff0c;一個點需要走兩步…