Runnable examples for the Devis microservices framework.
Node.js 22 or later is required.
npm install
| Example | What it shows | Run |
|---|---|---|
| local | register and call a pattern in one process | node local/index.js |
| tcp | call a microservice over TCP | node tcp/service.js, then node tcp/client.js |
| balance | spread calls over two instances of a service | PORT=3031 node balance/service.js, PORT=3032 node balance/service.js, then node balance/client.js |
| mongodb | store and read documents with devis-mongo-client | node mongodb/index.js |
| redis | publish and subscribe with devis-pub_sub-redis | node redis/index.js |
| rabbitmq | call a microservice through RabbitMQ with devis_rabbitmq | node rabbitmq/server.js, then node rabbitmq/client.js |
The plugin examples expect local servers. MONGO_URL, REDIS_URL, RABBITMQ_HOST and RABBITMQ_PORT override the defaults. To start them with Docker:
docker run -d -p 27017:27017 mongo:7 docker run -d -p 6379:6379 redis:7-alpine docker run -d -p 5672:5672 rabbitmq:4-alpine
npm test runs every example and checks its output.
To scaffold a new project instead, use generator-devis.
The former Library application was removed: it relied on the Devis 1 API, Wakanda and AngularJS, which no longer work.