create-zoom-bot
write bot app for zoom

Installation && Create project
npm i create-zoom-bot -g
create-zoom-bot create asana
create-zoom-bot create asana --nowrap
create-zoom-bot create asana --nowrap --dist ./asana
development in local
npm run start
or
sls offline --stage local
npm run start-static
npm run build-static
use dynamodb local
npm run dynamodb
or
sls dynamodb install
sls dynamodb start --port 8089
npm run dynamodb-remove
or
sls dynamodb remove
delete .dynamodb
development react page
we use antd for the default ui lib,and inject zoom ui variables in it,and you don't need to config webpack,just use "import {Button} from antd" to use components,and you can write code in "./static/src/app/Home.js" to write your code directly.
use quick-react-webpack to start react project,and default config is done, in general, no special Settings are required,if you have some special config,you can write it in ./appconfig.js
json serverless.dev|prod|local.json template notice
{
"app":"appName",
"handler":"app/index.handler",
"environment":{"app":"appName"},
"exclude":[],
"timeout":10,
"stages":{
"static":false,
"test":false
}
}
{
....
"serverless-offline": {
"port": 3000
},
"static": {
"port": 3003
},
....
"environment": {
"staticPort": 3003
}
}
Pay attention to
Because we need all lambda functions to be one domain name,We used serverless's share API gateway,so you need add you appName as prefix in you router ,we can distinguish different bot by app name To satisfy that under the same domain . If you not add prefix with your router,you won't get your response. example as follows
app.use(`/${process.env.app}`,router);
config file
- in serverless.*.json change your app name,timeout,and environment,no need to add bucket and role and others,because these args is secret,we will add it in zoom deploy env