chore: add inngest package and update client initialization

This commit is contained in:
javayhu 2025-07-11 23:53:46 +08:00
parent bda2571a78
commit 997c362ac9
4 changed files with 1599 additions and 19 deletions

View File

@ -98,6 +98,7 @@
"fumadocs-core": "^15.5.3",
"fumadocs-mdx": "^11.6.8",
"fumadocs-ui": "^15.5.3",
"inngest": "^3.40.1",
"input-otp": "^1.4.2",
"lucide-react": "^0.483.0",
"motion": "^12.4.3",

1600
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -2,9 +2,12 @@ import { serve } from 'inngest/next';
import { inngest } from '../../../inngest/client';
import { helloWorld } from '../../../inngest/functions';
/**
* Inngest route
*
* https://www.inngest.com/docs/getting-started/nextjs-quick-start
*/
export const { GET, POST, PUT } = serve({
client: inngest,
functions: [
helloWorld, // <-- This is where you'll always add all your functions
],
functions: [helloWorld],
});

View File

@ -1,4 +1,8 @@
import { Inngest } from 'inngest';
// Create a client to send and receive events
export const inngest = new Inngest({ id: 'my-app' });
/**
* Create a client to send and receive events
*
* https://www.inngest.com/docs/getting-started/nextjs-quick-start
*/
export const inngest = new Inngest({ id: 'mksaas-template' });