Diet is a tiny, fast and modular node.js web framework. Good for making fast & scalable apps and apis.
var server = require('diet')
var app = server()
app.listen(8000)
app.get('/', function($){
$.end('hello world')
})
Features
- Built for virtual hosting
- Request and Reponse combined into the signal object ($)
- Simple and Semantic Routing with app.get and app.post and other methods.
- Middleware Support
- MVC (model-view-controller) Support
- Header and footer routes for better global middleware structuring
- Support for ES6 Generator Middlewares/Controllers (new since v0.10)
- Asynchronous error handling with app.error routes
- 404 routing with app.missing
- Very small, just ~550 sloc
Install
npm install diet
Website & Community
- Website : http://dietjs.com
- Chat on Gitter
- Ask Questions on Stackoverflow
- Report Issues on Github
- Contribute to the Source code also on Github
- Download the latest official release from NPM
Tutorials
API
Resources
License
(The MIT License)
Copyright (c) 2014 Halász Ádám
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.