A Next.js integration for Temporal
This assumes you are using Temporal Cloud already and have the following information.
- TEMPORAL_API_ENDPOINT
- TEMPORAL_NAMESPACE
- TEMPORAL_PRIVATE_KEY
- TEMPORAL_PUBLIC_KEY
- After cloning the repo, add a
.env.local
file and add the above environment variables with their values. - Run
pnpm install
in the repo home - Run
npm run dev
to run locally. Open your browser to interact with the buttons.
Temporal requires that the workflow code be bundled before including with the worker. Workflows and activities should be added to the /src/lib/temporal
folder.
Once added, run npm run bundle-temporal
to bundle the code and place it in the dist
folder. NextJS will then use this code when starting up a Temporal worker.
MIT