This repository holds some simple examples to demonstrate how to implement microservices in Node.js with cote, A Node.js library for building fault-tolerant, scalable microservices with auto-discovery.
The slides that talk about cote is here.
Clone the repository via
git@github.com:dashersw/berlin-nodejs-meetup-cote.git
Install NPM dependencies
cd berlin-nodejs-meetup-cote
npm install
Start the example services by running the following commands in separate terminals
node time-service.js
node client.js
node publisher.js
node subscriber.js
There is also a front-end component to demonstrate communication with the browser. Running;
node frontend/server.js
will start an HTTP server listening to port 5555. Navigate to http://localhost:5555 in your browser and you can see the messages being logged in the console.