Node.js Web框架:Diet
jopen
10年前
Diet是一个微小,快速和模块化的Node.js的web框架。适合开发快速和可扩展的应用程序和API。
var server = require('diet') var app = server() app.listen(8000) app.get('/', function($){ $.end('hello world') })
特性
- 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