@yong-talentseer/rap-cli
v1.0.10
Published
node based scaffolding tool
Downloads
13
Readme
Rap CLI
CLI tool to create serverless project base on dawan-template.
Integration: Travis CI, Commitizen, Serverless
Prerequisite
brew install ruby
gem install travis -v 1.8.10 --no-rdoc --no-ri
travis login --pro
npm install -g commitizen
Installation
npm install -g @yong-talentseer/rap-cli
Usage
rap init example
Domain
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 |
Configuration
.env
file
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 Environment Variables
Access database connection strings in your code with ${process.env.DB_CONNECTION_STRING}
Access stage (dev or prod) with ${process.env.STAGE}