@blueprod/ws-koa

0.1.3 • Public • Published

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).

Dependencies (20)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @blueprod/ws-koa

    Weekly Downloads

    1

    Version

    0.1.3

    License

    MIT

    Unpacked Size

    77.8 kB

    Total Files

    35

    Last publish

    Collaborators

    • thanhlq
    • vudv