NYAFoundation / NYA.js

Nya - Flexible javascript FRP framework
MIT License
3 stars 0 forks source link

NYA Framework

Gitter Dependency Status devDependency Status Code Climate Build Status

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();  
});

Links