This is the Inngest SDK to send events from the browser. If you’re looking for the Inngest JavaScript/TypeScript Node.js SDK check out that repo here: https://github.com/inngest/inngest-js
Add the script via unpkg:
<script src="https://unpkg.com/@inngest/browser/inngest.min.js" />
Initialize your client with an Inngest event key and send your event:
inngest.init("<replace-with-your-event-key>");
inngest.send({
name: "your.event.name",
data: {
useful: "information",
},
user: {
// optionally append user data
email: "test@example.com",
},
});
That’s it - you’re now sending events from the browser.
⚠️ - NOTE - You should add an allow list for your events in the Inngest Cloud dashboard as to prevent anyone from sending event data that doesn’t match that list. This is useful to prevent abuse or spam.
yarn build
yarn np # to publish