Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lesyk/serverless-slack-events-handler-example
Serverless setup to handle slack events
https://github.com/lesyk/serverless-slack-events-handler-example
bot events lambda lambda-functions serverless slack
Last synced: 20 days ago
JSON representation
Serverless setup to handle slack events
- Host: GitHub
- URL: https://github.com/lesyk/serverless-slack-events-handler-example
- Owner: lesyk
- License: mit
- Created: 2017-12-12T13:59:04.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-23T19:37:46.000Z (almost 2 years ago)
- Last Synced: 2024-11-01T14:12:06.380Z (2 months ago)
- Topics: bot, events, lambda, lambda-functions, serverless, slack
- Language: TypeScript
- Size: 219 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# serverless-slack-events-handler-example
[![Build Status](https://travis-ci.org/AtoriAI/serverless-slack-events-handler-example.svg?branch=master)](https://travis-ci.org/AtoriAI/serverless-slack-events-handler-example)## Install
1. Install packages
`nvm install 6.10.3`
`npm install -g serverless`
`npm install -g typescript`
`npm install -g nodemon`
2. Change `VERIFICATION_TOKEN` to your's bot verification token. You can find it here: https://api.slack.com/apps/[YOUR_BOT_ID]/general## Run
1. `ngrok http 8080`
2. `nodemon index.js`
3. Copy url to slack bot events subscription page: https://api.slack.com/apps/[YOUR_BOT_ID]/event-subscriptions
4. Start getting events on localhost## Deploy
1. Export `AWS_SECRET_ACCESS_KEY` and `AWS_SECRET_ACCESS_KEY`
```
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=
```
2. `sls deploy`
3. Copy url to slack bot events subscription page: https://api.slack.com/apps/[YOUR_BOT_ID]/event-subscriptions
4. Start getting events on function## Logging
`serverless logs -f app`