@blueprod/ws-koa

Web Service implementation via Koa.js

Usage no npm install needed!

<script type="module">
  import blueprodWsKoa from 'https://cdn.skypack.dev/@blueprod/ws-koa';
</script>

README

Web Service implementation by Koa.js

The purpose of this module is to integration of all koa's best middlewares which are ready for production.

Also so to give facilities for dynamic API binding and websocket integration with socket.io.

How To Use

To do...

// this is wrong
app.use(function (ctx, next) {
    ctx.set("Access-Control-Allow-Origin", "*");
    next();
});
// this is right
app.use(async function (ctx, next) {
    ctx.set("Access-Control-Allow-Origin", "*");
    await next();
});

Develop & Register Your Middleware

License

MIT license

Author

Developed & maintained by EMSA TECHNOLOGY COMPANY LTD (contact @ emsa-technology dot com).