This is an example project demonstrating how to use Hatchet with Typescript.
Before running this project, make sure you have the following:
- Set the required environment variable
HATCHET_CLIENT_TOKEN
created in the Getting Started Guide.
export HATCHET_CLIENT_TOKEN=<token>
-
Run the following command to install the project dependencies:
npm install
- Start a Hatchet worker by running the following command:
npm run start
- To run the example workflow, open a new terminal and run the following command:
npm run run:simple
This will trigger the workflow on the worker running in the first terminal and print the output to the the second terminal.