Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 1.76 KB

README.md

File metadata and controls

39 lines (30 loc) · 1.76 KB

back4app-line-bot-starter-kit

Starter kit for line bot on back4app

Based on back4app-express-starter-kit

Features

  • babel (7.0.0-beta, preset-stage-0)
  • webpack (HMR)
  • eslint (airbnb/base, prettier)

Getting Started

  1. Install Back4App Cli
  2. Configure Back4App Account Keys
  3. npm run init-cloud-code
  4. Configure Parameters
    1. Back4App > Dashboard > Core > Config > Create a parameter
    2. Add LINE_BOT_CHANNEL_ACCESS_TOKEN, LINE_BOT_CHANNEL_SECRET as a String type
  5. Set PARSE_SERVER_DATABASE_URI as an environment variable
    • Get the URI from: Back4App > Server Settings > Core Settings
    • or, your local MongoDB
  6. npm start

Deploy

  1. npm run build
  2. npm run deploy

Remarks

Verifying Webhook URL

  • When you veriy a webhook url in the LINE Developers Console, it will fail because it sends events with invalid reply tokens. You can ignore the step. Webhook works well without verifying.

Replying Messages in DEV Phase

  • In most cases of the dev phase, reply tokens will be invalid. So, replying requests will be redirected to the console output.

About optionalDependencies in package.json