
Product
Introducing Webhook Events for Pull Request Scans
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
@fickou/adonis4-nats
Advanced tools
Add helper on Controller for Adonis JS 4+
Run:
npm i --save @fickou/adonis4-nats
Install provider:
Go to start/app.js
const providers = [
...,
'@fickou/adonis4-nats/providers/NatsProvider'
]
in service who you want to use
try {
const data={...};
const client = use("NatsClient");
await client.publish(`eventName`, data)
}catch (e){}
In a preload file:
Create preload file in start/nats.js
.
Add in server.js
.
const {Ignitor} = require('@adonisjs/ignitor');
new Ignitor(require('@adonisjs/fold'))
.appRoot(__dirname)
.preLoad('start/nats') // add
.fireHttpServer()
.catch(console.error);
After got to start/nats.js
const client = use("NatsClient");
await client.subscribe("eventName", function (message) {
console.log(message);
})
Message {
msg: Msg<any>// go to nats docs
decodeMsgContent: Record<string, any>
sub: Subscription//go to nats docs
}
docker user:
create nats-cluster.yaml
version: "3.5"
services:
nats:
image: nats
ports:
- "8222:8222"
- "4222:4222"
command: "--cluster_name nats --cluster nats://0.0.0.0:6222 --http_port 8222 "
networks: ["nats"]
volumes:
- natsData:/data
networks:
nats:
name: nats
run :
docker docker compose -f nats-cluster.yaml up -d
FAQs
adonis nats
We found that @fickou/adonis4-nats demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.
Product
A single platform for static analysis, secrets detection, container scanning, and CVE checks—built on trusted open source tools, ready to run out of the box.