Skip to content

elliotcw/nx-with-temporal

 
 

Repository files navigation

Nx <3 Temporal

This example app demonstrates how to put together an Nx integrated monorepo for a Temporal worker, together with workflows and activities.

Run

Make sure nx is in the global scope:

$ npm i -g nx

Make sure Temporal Server is running:

temporal server start-dev

Afterwards:

$ pnpm install
$ nx serve temporal-worker

This will start a TS SDK Temporal worker that is basically the same as the hello-world sample. It will not bundle the workflows for development speed, but we should bundle for production!

Bundling

Run:

$ nx bundle temporal-worker

This will create a Temporal worker that reads from the workflow bundle. It also bundles the workflows.

Run the worker with the bundled workflows as:

$ STAGE=production node dist/apps/temporal-worker/main.js

About

An Nx + (TS SDK) Temporal example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 80.4%
  • JavaScript 19.6%