Skip to content

c-c-epr/Line-Workers-Template

Repository files navigation

Line Workers Template

Language: English | 繁體中文

An “out-of-the-box” LINE Official Account webhook template for Cloudflare Workers.

Deploy to Cloudflare

Code Style: Prettier

✨ Features

  • Signature verification (validate webhook request source)
  • Reply messages
  • Mark messages as read
  • Message loading animation

🖊️ How to use this template

  1. Create a repo from this template
    1. Use this template => Create a new repository
    2. Fill in Repository name and other repository info
  2. Customize the code
    1. Message routing/handling: src/eventRouter.ts
    2. Config: wrangler.toml
      1. name
      2. secrets_store_secrets
        1. store_id (both entries) -> replace with your account store_id
  3. Deploy
    1. Cloudflare
    2. Workers & Pages
    3. Create application
    4. Continue with GitHub
    5. Fill in the required info

⚙️ Configuration

Type Name Description Purpose
Secrets Store LINE_CHANNEL_SECRET LINE Official Account channel secret Validate
Secrets Store LINE_CHANNEL_ACCESS_TOKEN LINE Official Account channel access token Validate

About

「開箱即用」的 Line 官方帳號 Webhook Cloudflare Workers 模板

Topics

Resources

License

Stars

Watchers

Forks