blaker
v0.0.4
Published
A modern and usable web framework for Node.js.
Downloads
1
Readme
Blaker
A modern and usable web framework for Node.js.
const { start, getUrl, getQuery, match, json } = require('blaker');
function* mainHandler() {
const { id } = yield match('GET', '/users/:id'); // if URL is not equal /users/:id then abort
const url = yield getUrl(); // get current url
const query = yield getQuery(); // get all query
return json({ paramId: id, currentUrl: url, requestQuery: query });
}
start(mainHandler)(3000); // listen 3000