inngest-cli 0.7.1 → 0.8.1
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 +33 -39
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|

|
|
6
6
|

|
|
7
7
|
|
|
8
|
-
|
|
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.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
<br />
|
|
9
12
|
|
|
10
|
-
Using Inngest, you can write and deploy serverless step functions which are triggered by events without writing any boilerplate code or infra. Learn more at https://www.inngest.com.
|
|
11
13
|
|
|
12
14
|
- [Overview](#overview)
|
|
13
15
|
- [Quick Start](#quick-start)
|
|
@@ -16,6 +18,12 @@ Using Inngest, you can write and deploy serverless step functions which are trig
|
|
|
16
18
|
|
|
17
19
|
<br />
|
|
18
20
|
|
|
21
|
+
The local development UI:
|
|
22
|
+
|
|
23
|
+

|
|
24
|
+
|
|
25
|
+
<br />
|
|
26
|
+
|
|
19
27
|
## Overview
|
|
20
28
|
|
|
21
29
|
Inngest makes it simple for you to write delayed or background jobs by triggering functions from events — decoupling your code from your application.
|
|
@@ -38,46 +46,32 @@ We created Inngest to bring the benefits of event-driven systems to all develope
|
|
|
38
46
|
|
|
39
47
|
## Quick Start
|
|
40
48
|
|
|
41
|
-
1.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
```shell
|
|
65
|
-
inngest dev -p 9999
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
5. Send events to the DevServer. Send right from your application using HTTP + JSON or simply, as a curl with a dummy key of `KEY`.
|
|
69
|
-
|
|
70
|
-
```shell
|
|
71
|
-
curl -X POST --data '{"name":"demo/event.sent","data":{"test":true}}' http://127.0.0.1:9999/e/KEY
|
|
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 serverL `npx inngest@latest dev`. That's _this_ cli.
|
|
51
|
+
3. [Integrate Inngest with your framework in one line](https://www.inngest.com/docs/frameworks/nextjs) via the `serve() handler`
|
|
52
|
+
4. [Write and run functions in your existing framework or project](https://www.inngest.com/docs/functions)
|
|
53
|
+
|
|
54
|
+
Here's an example:
|
|
55
|
+
|
|
56
|
+
```js
|
|
57
|
+
import { createStepFunction } from "inngest";
|
|
58
|
+
|
|
59
|
+
// This function runs on any platform in the background with retries any time
|
|
60
|
+
// the app/user.signup event is received - automatically.
|
|
61
|
+
export const signupFlow = createStepFunction("post-signup", "app/user.signup",
|
|
62
|
+
function ({ event, tools }) {
|
|
63
|
+
// Send the user an email
|
|
64
|
+
tools.run("Send an email", async () => {
|
|
65
|
+
await sendEmail({
|
|
66
|
+
email: event.user.email,
|
|
67
|
+
template: "welcome",
|
|
68
|
+
})
|
|
69
|
+
})
|
|
70
|
+
})
|
|
72
71
|
```
|
|
73
72
|
|
|
74
|
-
That's it - your hello world function should run automatically! When you `inngest deploy` your function to Inngest Cloud or your self-hosted Inngest. Here are some more resources to get you going:
|
|
75
73
|
|
|
76
|
-
-
|
|
77
|
-
- [Function arguments & responses](https://www.inngest.com/docs/functions/function-input-and-output?ref=github)
|
|
78
|
-
- [Sending Events to Inngest](https://www.inngest.com/docs/event-format-and-structure?ref=github)
|
|
79
|
-
- [Inngest Cloud: Managing Secrets](https://www.inngest.com/docs/cloud/managing-secrets?ref=github)
|
|
80
|
-
- [Self-hosting Inngest](https://www.inngest.com/docs/self-hosting?ref=github)
|
|
74
|
+
That's it - your function is set up!
|
|
81
75
|
|
|
82
76
|
<br />
|
|
83
77
|
|