Node.js Web框架:Diet
Diet是一個微小,快速和模塊化的Node.js的web框架。適合開發快速和可擴展的應用程序和API。
var server = require('diet')var app = server() app.listen(8000) app.get('/', function($){ $.end('hello world') })</pre>
特性
- Built for virtual hosting
- Request and Reponse combined into the signal object ($)
- Simple and Semantic Routing with app.get and app.post
- Middleware Support
- Header and footer routes for better global middleware structuring
- Asynchronous error handling with app.error routes
- 404 routing with app.missing
- Very small, just 335 sloc </ul>
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!