Skip to content

Latest commit

 

History

History
 
 

production

Production

An example of building your Workflow code bundle at build time and giving that prebuilt bundle to the Worker (in order to reduce Worker startup time).

For more production topics, see our Production & Deployment docs page.

Running this sample in development

  1. temporal server start-dev to start Temporal Server.
  2. npm install to install dependencies.
  3. npm run start.watch to start the Worker.
  4. In another shell, npm run workflow to run the Workflow.

The Workflow should return:

Hello, Temporal!

Running this sample in production

  1. npm run build to build the Worker script and Activities code.
  2. npm run build:workflow to build the Workflow code bundle.
  3. NODE_ENV=production node lib/worker.js to run the production Worker.