random-joke-slack-serverless
A random joke slack app build in serverless
documentation: https://documenter.getpostman.com/view/3827865/TVRoYmZG
api url: https://wovw7z3xpj.execute-api.ap-southeast-1.amazonaws.com/prod/api/joke
-
create slack app
-
add slash command, add your api endpoint to slash command
-
add
chat:write
andcommand
intoscope
-
add slack app to your channel
-
get the
oauth token
Requirement
- install yarn
- install node (v14+)
- install serverless
Testing and run
// test api in local
$ yarn run dev
// deploy to serverless
$ yarn run deploy
// open serverless dashboard
$ yarn run dashboard
// lint code
$ yarn run lint
// format code
$ yarn run format
// run test case
$ yarn run test
// remove serverless services in aws (api gateway, lambda, s3, cloudformation)
$ yarn run remove