Tianji Worker
This is a Tianji Worker project created by the Tianji CLI.
Getting Started
- Install dependencies:
npm install
- Build the worker:
npm run build
- Deploy to Tianji:
tianji worker deploy
Development
The worker code is located in src/index.ts. You can modify it to suit your needs.
The main handler function receives two parameters:
payload: The request payload (query params + body)context: The request context (type, request info)
Configuration
The .tianjirc file contains the project configuration:
name: The worker nameworkerId: The worker ID (auto-generated after first deployment)
Learn More
Visit Tianji Documentation to learn more about workers.