How to use the cote.Sockend function in cote

To help you get started, we’ve selected a few cote examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dashersw / cote-workshop / end-user / server.js View on Github external
var app = require('express')(),
    server = require('http').Server(app),
    io = require('socket.io')(server),
    cote = require('cote');

app.get('/', function (req, res) {
    console.log(`${req.ip} requested end-user interface`);

    res.sendFile(__dirname + '/index.html');
});

server.listen(5001);

new cote.Sockend(io, {
    name: 'end-user sockend server'
});
github dashersw / cote-workshop / admin / server.js View on Github external
namespace: 'product'
});

var userRequester = new cote.Requester({
    name: 'admin user requester',
    namespace: 'user'
});

var purchaseRequester = new cote.Requester({
    name: 'admin purchase requester',
    namespace: 'purchase'
});

server.listen(5000);

new cote.Sockend(io, {
    name: 'admin sockend server'
});

cote

A Node.js library for building zero-configuration microservices.

MIT
Latest version published 5 months ago

Package Health Score

61 / 100
Full package analysis