Files

Tianji Worker

This is a Tianji Worker project created by the Tianji CLI.

Getting Started

  1. Install dependencies:
npm install
  1. Build the worker:
npm run build
  1. 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 name
  • workerId: The worker ID (auto-generated after first deployment)

Learn More

Visit Tianji Documentation to learn more about workers.