See:
See the Cloud Functions Slack tutorial.
-
Read and follow the prerequisites.
-
Install dependencies:
npm install
-
Run the tests:
npm test
gcloud functions deploy bananaSplit \
--runtime nodejs14 \
--trigger-http \
--allow-unauthenticated \
--set-env-vars SLACK_SECRET=<SLACK_BOT_API_TOKEN>
Use following command to run application locally on port 3000:
SLACK_SECRET=<SLACK_BOT_TOKEN> node run-local.js
You can use sample http request from http
folder in order to check if everything works