WS-API
Server and client library for implementing api on top of the websocket
Install
npm install --save ws-api
Requirements
- Promise (native or polyfill in global scope)
- async/await support (only for node.js), use node 7.6+ or node 8.0+ (recommended)
Usage examples
client
const api = '//localhost:3000/'; api; api; document;
server
const fs = ;const Server = ; const api = port: 3000; // In all your methods this is connection context// The context is passed to the last arguments of the function// (for use it in arrow functions) api; api; api; api; api;
Api docs
see docs
License
MIT