quark.io - minimalistic web framework for Node.js
quark.io is the minimalistic web framework for creating small and beautiful HTTP servers.
Main features
- Less dependencies from others packages
- Easy routing
- Jade support
- Static files
- Middleware
Installation
Just do npm install quark.io
Hello World Server
var quark = ; var app = port: 3002; app; appstart;
Another examples
Another examples look at the examples
directory of the repository.
Creating new server
var quark = ; var app = port: 3002 // Listening port, by default 8888 debug: true // Debug mode, will produce more output to the logger statics: 'public/' 'uploads/' // Static directories, this array by default empty. logger: < Any logger that has similar methods as console > // By default output goes to the console renderTemplate: < Any callback ;
Routing
Simple routes:
app;app;app;app;
Routes with arguments (argument names in route should be equals to the names of the arguments of function):
app;app;
Middleware
{ console;}; { console;}; app;
Requests and responses
Requests and responses are fully compatible with native node.js implementation. But response has some new features:
res;res;res;restextdata headers;res;res;res;res;res;
Performance
Framework's performance tested with Apache Benchmark (all scripts and results inside benchmark/
directory).
Support
If you do have a contribution for the package feel free to put up a Pull Request or open Issue.