0.3.10 • Published 5 years ago

create-zoom-bot v0.3.10

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
5 years ago

create-zoom-bot

write bot app for zoom

npm.io

Installation && Create project

npm i create-zoom-bot -g

//will have command interaction to prompt what modules to use, and whether to use react page.

create-zoom-bot create asana

create-zoom-bot create asana --nowrap // create structure in current root dir,not wrap in a dir

// point dir to create
create-zoom-bot create asana --nowrap --dist ./asana  

// if you only want to create serverless config file to your current dir
//you can use "create-zoom-bot init" or "create-zoom-bot init --dist lti" 
//to only create config files in you current dir

// if you have create bot template,and want to add static single,you can use "create-zoom-bot create-static" to create static directory in current dir

development in local

//run backend service
npm run start 
or
sls offline --stage local

//run frontend
npm run start-static

//build frontend
npm run build-static

use dynamodb local

//install && start

npm run dynamodb  //npm run dynamodb -- --port 8089

or

sls dynamodb install //in your root directory
sls dynamodb start --port 8089 //run dynamodb port


//remove 

npm run dynamodb-remove // rm -r can't use in windows

or 

sls dynamodb remove 
delete .dynamodb

//and then you can use dynamodb local just like new AWS.DynamoDB.DocumentClient() ...

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",//app name which your prefix path and application&&function name,will auto create by structure created
    "handler":"app/index.handler",//optional,which file you want to bind with your js,default is app/index.handler
    "environment":{"app":"appName"},//will auto create by structure created
    "exclude":[],//optional,the files&&dirs which you want to exclude
    "timeout":10, //timeout which you want to special
    "stages":{
        "static":false,//default in static directory,and build in staticBuild directory
        "test":false//default run npm run test in root directory
    }
}

//in local.json,can config custom dev port

{
 ....
 "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

//template have already add follow prefix,so you don't need to add extra prefix
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
0.3.10

5 years ago

0.3.9

5 years ago

0.3.8

5 years ago

0.3.7

5 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago