Set Up A Local Development Environment For Temporal and TypeScript - Learn Temporal
Set Up A Local Development Environment For Temporal and TypeScript - Learn Temporal
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.
You can also add the Temporal TypeScript SDK to an existing project with the following
command:
https://learn.temporal.io/getting_started/typescript/dev_environment/ 1/3
02/08/2023, 06:50 Set up a local development environment for Temporal and TypeScript | Learn Temporal
You can also install Temporal CLI using the installation script. Review the script and then
download and install Temporal CLI with the following command:
$ curl -sSf https://temporal.download/cli.sh | sh
To manually install Temporal CLI, download the version for your architecture:
Download Temporal CLI for Intel Macs
Download Temporal CLI for Apple Silicon Macs
Once you've downloaded the file, extract the downloaded archive and add the temporal
binary to your PATH by copying it to a directory like /usr/local/bin .
Once you've installed Temporal CLI and added it to your PATH , open a new Terminal window
and run the following command:
https://learn.temporal.io/getting_started/typescript/dev_environment/ 2/3
02/08/2023, 06:50 Set up a local development environment for Temporal and TypeScript | Learn Temporal
This command starts a local Temporal Cluster. It starts the Web UI, creates the default
Namespace, and uses an in-memory database.
The Temporal Server will be available on localhost:7233 .
The Temporal Web UI will be available at http://localhost:8233 .
Leave the local Temporal Cluster running as you work through tutorials and other projects. You
can stop the Temporal Cluster at any time by pressing CTRL+C .
CHANGE THE WEB UI PORT
The Temporal Web UI may be on a different port in some examples or tutorials. To change
the port for the Web UI, use the --ui-port option when starting the server::
$ temporal server start-dev --ui-port 8080
When you stop and restart the Temporal Cluster and specify the same filename again, your
Workflows and other information will be available.
Once you have everything installed, you're ready to build apps with Temporal on your local
machine.
https://learn.temporal.io/getting_started/typescript/dev_environment/ 3/3