Skip to content

Example workflows and setup instructions to use Hatchet with Typescript projects

Notifications You must be signed in to change notification settings

hatchet-dev/hatchet-typescript-quickstart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hatchet First Workflow Example

This is an example project demonstrating how to use Hatchet with TypeScript. For detailed setup instructions, see the Hatchet Setup Guide.

Prerequisites

Before running this project, make sure you have the following:

  1. Node.js v16 or higher
  2. npm, yarn, or pnpm package manager

Setup

  1. Clone the repository:
git clone https://github.com/hatchet-dev/hatchet-typescript-quickstart.git
cd hatchet-typescript-quickstart
  1. Set the required environment variable HATCHET_CLIENT_TOKEN created in the Getting Started Guide.
export HATCHET_CLIENT_TOKEN=<token>

Note: If you're self hosting you may need to set HATCHET_CLIENT_TLS_STRATEGY=none to disable TLS

  1. Install the project dependencies:
npm install
# or
yarn install
# or
pnpm install

Running an example

  1. Start a Hatchet worker:
npm run start
  1. In a new terminal, run the example task:
npm run run:simple

This will trigger the task on the worker running in the first terminal and print the output to the second terminal.

About

Example workflows and setup instructions to use Hatchet with Typescript projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published