0.4.6 • Published 5 months ago
@busywork/core v0.4.6
busywork-core
A core package for Busywork providing Temporal client helpers.
Installation
npm install busywork-coreUsage
Temporal Client
import { getTemporalClient } from 'busywork-core/temporal';
// Set up environment variables
process.env.TEMPORAL_ADDRESS = 'your-temporal-address';
process.env.TEMPORAL_NAMESPACE = 'your-namespace';
process.env.TEMPORAL_API_KEY = 'your-api-key';
// Get Temporal client
const client = await getTemporalClient();
// Use the client to interact with Temporal
// ...Environment Variables
The Temporal client requires the following environment variables:
TEMPORAL_ADDRESS: The address of your Temporal serverTEMPORAL_NAMESPACE: Your Temporal namespaceTEMPORAL_API_KEY: Your Temporal API key
For local development, you can set NODE_ENV=dev and USE_DEV_SERVER=true to use a local Temporal server.
Development
# Install dependencies
npm install
# Build the package
npm run build