Temporal UI provides a visual interface for monitoring and managing your Temporal workflows. After starting Temporal with the UI, you can access it at http://localhost:8080.Here’s how you might integrate Temporal with your application:
temporal-workflow-example.tsx
Copy
import { Client, Connection } from '@temporalio/client';import { nanoid } from 'nanoid';// Connect to Temporal serverasync function run() { const connection = await Connection.connect({ address: 'localhost:7233', // Default Temporal server address }); const client = new Client({ connection, namespace: 'default', // Specify your namespace }); // Start a workflow execution const handle = await client.workflow.start('YourWorkflow', { taskQueue: 'your-task-queue', workflowId: 'workflow-' + nanoid(), args: ['workflow input'], }); console.log(`Started workflow ${handle.workflowId}`); // You can now view this workflow in the Temporal UI at: // http://localhost:8080/namespaces/default/workflows/workflow-[id]}run().catch(err => console.error(err));