Server as a function for Node.js
Zealot is a layer on top of http
making it a stream,
where values are of type Result
(aka Either). This means all requests are manipulated with a stream processing
mindset, while errors are not treated as exceptions – but expected outcomes.
- Truly functional
- Clear, hackable code
- API focused
- As safe as JS can be without transpiler crap
http
standard lib is too low level- connect & express have a very ad-hoc API, rely on in-place updates of requests and responses, has many arbitrary arity functions, and lots of backward compatibility code;
- follow more or less the "your server as a function" architecture;
- rely on the best tools out there
yarn add zealot-core
Extremely experimental.