Skip to content

holbrookab/nextjs-temporal

Repository files navigation

nextjs-temporal

A Next.js integration for Temporal

Pre-Requisites

This assumes you are using Temporal Cloud already and have the following information.

Required Environment variables

  • TEMPORAL_API_ENDPOINT
  • TEMPORAL_NAMESPACE
  • TEMPORAL_PRIVATE_KEY
  • TEMPORAL_PUBLIC_KEY

Installation (local)

  1. After cloning the repo, add a .env.local file and add the above environment variables with their values.
  2. Run pnpm install in the repo home
  3. Run npm run dev to run locally. Open your browser to interact with the buttons.

Updating workflows

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.

License

MIT

About

A proof of concept NextJS application showing how to leverage Temporal SDK

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published