Grasshopper is a feature-rich and flexible web application framework for node.js with support for most of the features web applications would need.
Features
- Integrated support for dependency injection.
- Filters for intercepting requests.
- Supports i18n out of the box.
- Handles updation and validation of models from forms.
- Supports on the fly Gzip compression of responses.
- Static files can also be pre-compressed to save compression on each request.
- Supports flash messages.
- Allows adding view helpers to enable smarter views.
- Layout and "include" support for views.
- Automatic selection of view file based on request's extension.
- Support for HTTPS with automatic redirection.
- Supports Basic and Digest authentication.
- Session management with support for custom session storage.
- Simple API to create and consume cookies.
- Fast file uploads using node-formidable.
- Configurable form post and upload sizes.
- Makes sending files as response attachments using 'Content-Disposition' simple.
- Supports partial download of static files.
- Supports
if-modified-since
, if-none-match
and if-range
headers.
- Plenty of documentation through examples.
Hello World
Install grasshopper in your application's directory with this command.
npm install grasshopper
Create a file named hello.js
with this content.
var gh = require('grasshopper');
gh.get('/', function() {
this.renderText('Hello World!');
});
gh.serve(8080);
Execute it with node hello.js
and point your browser at http://localhost:8080/.
What Next?
Follow the Shoutbox and CRUD examples to see various features of Grasshopper in action.
Project README and Github Wiki contain several more tutorials and examples.
Use the Mailing List for support on using Grasshopper.