nya
v0.0.3
Published
Node Yet Another Framework
Downloads
11
Readme
NYA Framework
NYA - is a fullstack FRP framework for racket web based on kefir. No models, no controllers, no views - only streams and events.
Instalation
npm install nya
Basic example
//Import nya.js
var nya = require('nya');
var requests = new nya.RequestStream('http');
var routes = new nya.RouteStream(requests); //automatic pipe binding
var index = routes.onGet().onUrl('/');
var responses = nya.ResponseStream(index); //automatic pipe binding
responses.onValue(function(request) {
request.res.writeHead(200, {
'Content-Type' : 'text/plain',
});
request.res.write('NYA!');
request.res.end();
});