Plunk NPM Package

When sending events to Plunk from Node.js, you can use the Plunk NPM Package. This package is a simple API wrapper that also offers full TypeScript support.



Before you can get started, you need to install the package in your project using your favourite package manager.

npm i @plunk/node

Plunk Client

All interactions with Plunk happen through the Plunk client which you should only make once and reuse in your entire project.

1import Plunk from '@plunk/node'; 
3const plunk = new Plunk("your-api-key");

Sending an event

Once you have created the client, you can use it send events to your Plunk dashboard.

1const success = await{
2    event: 'my-event',
3    email: ''