inngest-cli 0.9.2 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,12 +5,10 @@
|
|
|
5
5
|

|
|
6
6
|

|
|
7
7
|
|
|
8
|
-
Run reliable serverless functions in the background.
|
|
9
|
-
|
|
8
|
+
Run reliable serverless functions in the background. Inngest allows you to schedule, enqueue, and run serverless functions in the background reliably with retries on any platform, with zero infrastructure, fully locally testable. Learn more: https://www.inngest.com.
|
|
10
9
|
|
|
11
10
|
<br />
|
|
12
11
|
|
|
13
|
-
|
|
14
12
|
- [Overview](#overview)
|
|
15
13
|
- [Quick Start](#quick-start)
|
|
16
14
|
- [Project Architecture](#project-architecture)
|
|
@@ -26,9 +24,9 @@ The local development UI:
|
|
|
26
24
|
|
|
27
25
|
## Overview
|
|
28
26
|
|
|
29
|
-
Inngest makes it simple for you to write delayed or background jobs by triggering functions from events — decoupling your code
|
|
27
|
+
Inngest makes it simple for you to write delayed or background jobs by triggering functions from events — decoupling your code within your application.
|
|
30
28
|
|
|
31
|
-
- You send events from your application via
|
|
29
|
+
- You send events from your application via our SDK (or with a Webhook)
|
|
32
30
|
- Inngest runs your serverless functions that are configured to be triggered by those events, either immediately, or delayed.
|
|
33
31
|
|
|
34
32
|
Inngest abstracts the complex parts of building a robust, reliable, and scalable architecture away from you so you can focus on writing amazing code and building applications for your users.
|
|
@@ -46,31 +44,45 @@ We created Inngest to bring the benefits of event-driven systems to all develope
|
|
|
46
44
|
|
|
47
45
|
## Quick Start
|
|
48
46
|
|
|
47
|
+
👉 [Read the full quick start guide here](https://www.inngest.com/docs/quick-start?ref=github-inngest-readme)
|
|
48
|
+
|
|
49
49
|
1. [NPM install our SDK for your typescript project](https://github.com/inngest/inngest-js): `npm install inngest`
|
|
50
|
-
2. Run the Inngest dev server: `npx inngest@latest dev
|
|
51
|
-
3. [Integrate Inngest with your framework in one line](https://www.inngest.com/docs/
|
|
52
|
-
4. [Write and run functions in your existing framework or project](https://www.inngest.com/docs/functions)
|
|
50
|
+
2. Run the Inngest dev server: `npx inngest@latest dev` (This repo's CLI)
|
|
51
|
+
3. [Integrate Inngest with your framework in one line](https://www.inngest.com/docs/sdk/serve?ref=github-inngest-readme) via the `serve()` handler
|
|
52
|
+
4. [Write and run functions in your existing framework or project](https://www.inngest.com/docs/functions?ref=github-inngest-readme)
|
|
53
53
|
|
|
54
54
|
Here's an example:
|
|
55
55
|
|
|
56
|
-
```
|
|
57
|
-
import {
|
|
56
|
+
```ts
|
|
57
|
+
import { Inngest } from "inngest";
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
59
|
+
const inngest = new Inngest({ name: "My App" });
|
|
60
|
+
|
|
61
|
+
// This function will be invoked by Inngest via HTTP any time the "app/user.signup"
|
|
62
|
+
// event is sent to to Inngest
|
|
63
|
+
export default inngest.createFunction(
|
|
64
|
+
{ name: "User onboarding communication" },
|
|
65
|
+
{ event: "app/user.signup" },
|
|
66
|
+
async ({ event, step }) => {
|
|
67
|
+
await step.run("Send welcome email", async () => {
|
|
65
68
|
await sendEmail({
|
|
66
|
-
email: event.
|
|
69
|
+
email: event.data.email,
|
|
67
70
|
template: "welcome",
|
|
68
|
-
})
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
// Elsewhere in your code (e.g. in your sign up handler):
|
|
77
|
+
|
|
78
|
+
inngest.send({
|
|
79
|
+
name: "app/user.signup",
|
|
80
|
+
data: {
|
|
81
|
+
email: "test@example.com",
|
|
82
|
+
},
|
|
83
|
+
});
|
|
71
84
|
```
|
|
72
85
|
|
|
73
|
-
|
|
74
86
|
That's it - your function is set up!
|
|
75
87
|
|
|
76
88
|
<br />
|
|
@@ -108,7 +120,7 @@ For specific information on how the DevServer works and how it compares to produ
|
|
|
108
120
|
|
|
109
121
|
- [**Join our online community for support, to give us feedback, or chat with us**](https://www.inngest.com/discord).
|
|
110
122
|
- [Post a question or idea to our Github discussion board](https://github.com/orgs/inngest/discussions)
|
|
111
|
-
- [Read the documentation](https://www.inngest.com/docs)
|
|
123
|
+
- [Read the documentation](https://www.inngest.com/docs?ref=github-inngest-readme)
|
|
112
124
|
- [Explore our public roadmap](https://github.com/orgs/inngest/projects/1/)
|
|
113
125
|
- [Follow us on Twitter](https://twitter.com/inngest)
|
|
114
126
|
- [Join our mailing list](https://www.inngest.com/mailing-list) for release notes and project updates
|