Inngest Dev Server

Transcript

[00:01] With ingest, absolutely one of my favorite features is this local development server. And what this gives you is this ability to develop and iterate rapidly in your local environment. In this case, I'm working on a new feature that relies on Stripe checkout completed events. So we have a web hook handler and Stripe sends us that web hook. We process that web hook and do some things and then it emits an ingest event.

[00:30] And that ingest event is the Stripe checkout completed event and that gets us into this function and from this function the event is carrying data in this case quantity and created and what I want to do is actually load some bonuses and see if they're any available or if they're all expired to check to see if this particular user has bonuses available to them. And what I can do is come into the dev server and instead of doing 42424242 and doing that full stripe loop over and over again, I can come in here and just trigger an event and that looks like this. So we're going to send that event and behind the scenes that event is coming here. It has triggered this function, it's come down and it's going to hit this first step and run it. And we can come over here and go pretty quick and I'll stretch this out a little bit and you can see that this at this particular time these two bonuses are available.

[01:27] Now what's neat is I can come in and say edit and replay and I'll just bump this to when I know it's expired, send that, that event has ran in the background, come in here and check and now there are no available bonuses. And I can make code updates, I can change my query and then just keep testing this without having to go through and do that whole kind of back-end loop with the actual service. This is kind of like a hands-on mock service that the Ingest dev server provides me and it is just really sweet to get things done quickly.