Skip to content

The server application to handle chat bot and dealing with both patients and vonlunteers information

License

Notifications You must be signed in to change notification settings

covid-self-check/covid-self-check-backend

Repository files navigation

Comcovid-backends

The server application to handle chat bot and dealing with both patients and vonlunteers information

Prerequesite

  • Firebase CLI
  • NodeJS

Get environment variable for local development

firebase functions:config:get > .runtimeconfig.json

firebase functions:config:get | ac .runtimeconfig.json

Local test

Prerequesites

  • firebase
  • ngrok

Steps

  1. Install firebase emulators (install every emulator).
firebase init emulators
  1. Start the cloud function server.
cd functions
yarn install
yarn test
  1. Start the ngrok tunnel (Using region Japan).
ngrok http -region=jp 5001 
  1. Connect webhook to line.

Your webhook url should look like this: "http://localhost:5001/(project_name)/asia-southeast2/webhook" <- local webhook.

Replace local webhook domain with ngrok domain.