npm install @involves/nats-stream-lib --save
const express = require('express')
const { NatsStreamMiddleware } = require('@involves/nats-stream-lib')
const app = express()
app.use(NatsStreamMiddleware.setService)
app.get('/:id', (req, res) => {
await req.integration.natsStream.publish('queueName', 'message')
res.send()
})
At the terminal, just type the command:
make test