An oppinionated reactive server side web framework for node.js based off of RxJS.
Clone the repo to a destination of your choice:
git clone email@example.com:WarpcoreLabs/eps.git
Install the dependencies:
Fire the bass cannon:
Pick up your loot at http://localhost:3000
EPS is part framework part lego kit. It gives you lots of powerful components to snap together and you can choose to create or replace whatever components you see fit.
A basic setup starts with a master process spawning, monitoring and reviving
worker processes. The worker processes spin up HTTP servers and compose
a set of request handling components together known as
At the end of the
root middleware composition there is a responseConsumer
subscribed too it that takes responses and sends them to the client.
This basic setup typically lives in your src/main.js file and will look something like the following:
var cluster = ;var os = ;var RxHttpServer = ;var requestLogger = ;var less = ;var staticFiles = ;var services = ;var cookieReader = ;var cookieWriter = ;var flashSessionReader = ;var flashSessionWriter = ;var signedSessionReader = ;var signedSessionWriter = ;var router = ;var cpus = oslength;var server = ;var lessPath = path;var publicPath = path;if clusterisMasterfor var i = 0; i < cpus; i++cluster;cluster;elseserverrequests;server;
Likewise, each controller is a composition of components. The actual controller
action is preceded by an optional and custom
preAction pipeline and followed
by another optional and custom
A simple example that makes sure a user is unauthenticated and grabs the
template service in the
preAction pipeline and does etag cache checking
postAction pipeline would look something like this:
var Rx = ;var handler = ;var OkResponse = ;var response = ;var unauthenticated = ;var requireService = ;var etagHit = ;var etagResponse = ;moduleexports =;