4.0.0 • Published 6 years ago

syrah v4.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

Syrah

Fast, minimalist TCP middleware framework for node

Basic usage

Echo server

const Syrah = require('syrah');
const app = new Syrah();

app.use((ctx, next) => {
  console.log(ctx.rawBuffer);
  next();
});

app.use((ctx) => {
  ctx.body = ctx.rawBuffer
});

app.listen(9991);

Time server

const Syrah = require('syrah');
const app = new Syrah();

app.use(ctx => {
  ctx.body = new Date().toUTCString();
  ctx.close('\n');
});

app.listen(9991);
4.0.0

6 years ago

3.0.0

6 years ago

2.0.0

6 years ago

0.0.1

7 years ago