CLI tool to create serverless project base on dawan-template.
Integration: Travis CI, Commitizen, Serverless
brew install ruby
gem install travis -v 1.8.10 --no-rdoc --no-ri
travis login --pro
npm install -g commitizen
npm install -g @yong-talentseer/rap-cli
rap init example
If enter example.com
as domain and skipped basePath, the service will be deployed to:
Stage | Link |
---|---|
dev |
https://dev-api.example.com/api/hello-world |
prod |
https://api.example.com/api/hello-world |
Will be used for serverless offline environment and Travis CI environment.
DB_CONNECTION_STRING='<YOUR DB CONN STRING HERE>'
AWS_ACCESS_KEY_ID='<YOUR AWS ACCESS KEY ID HERE>'
AWS_SECRET_ACCESS_KEY='<YOUR AWS SECRET ACCESS KEY HERE>'
Access database connection strings in your code with ${process.env.DB_CONNECTION_STRING}
Access stage (dev or prod) with ${process.env.STAGE}