This sample demonstrates a minimalistic single-file style that might be useful for quickly sketching out an idea, or for sharing a minimal reproduction of a bug. Production code should not be arranged like this! See the other samples in this repo for recommended project structure.
To get started quickly without cloning:
npm install --save ts-node @temporalio/worker @temporalio/workflow @temporalio/client @temporalio/common
curl -sOL https://raw.githubusercontent.com/temporalio/samples-typescript/main/scratchpad/scratchpad.ts
ts-node scratchpad.tsIf you've cloned this repo locally, you can run:
temporal server start-devto start Temporal Server.npm installto install dependencies.npm run start.watchto run the single file,scratchpad.ts.
The following will be printed out:
Hello, Temporal!