Skip to main content

Set up a local development environment for Temporal and TypeScript

To follow the TypeScript SDK tutorials and build your own Temporal applications, you'll need the TypeScript SDK and a Temporal server.

Install Node.js

The TypeScript SDK requires Node.js 14 or later.

Install Node.js via your package manager by following the official Node.js instructions.

Set up the Temporal TypeScript SDK

You can create a new project with the Temporal SDK:.

npx @temporalio/create@latest ./my-app

You can also add the Temporal TypeScript SDK to an existing project with the following command:

npm install @temporalio/client @temporalio/worker @temporalio/workflow @temporalio/activity

Set up a Temporal development cluster

Download and install the Temporal development cluster locally using Docker Compose. You'll run this server in the background while you develop your applications.

You must have Docker and Docker Compose installed.

Then clone the temporalio/docker-compose repository and run docker-compose up from the root of that repo:

git clone https://github.com/temporalio/docker-compose.git
cd docker-compose
docker-compose up

When the Temporal Cluster is running, the Temporal Web UI becomes available in your browser: localhost:8080

Review other methods in the Run a dev Cluster section in Temporal's documentation.

Once you have everything installed, you're ready to build apps with Temporal on your local machine.