The main framework of reinjs
npm i @reinjs/rein
Use in common project:
const Worker = require('@reinjs/rein');
const worker = new Worker({
cwd: __dirname
});
worker.listen();
Use in cluster:
const Cluster = require('@reinjs/rein-cluster');
const cluster = new Cluster({
cwd: __dirname,
agents: ['book'],
timeout: 10000,
framework: '@reinjs/rein'
});
cluster.listen().then(() => console.log('cluster is ok')).catch(e => console.error(e));
More API see document(coming soon...).
It is MIT licensed.