Serverless functions for Macguider
-
Provides serverless executions for modest jobs:
-
Periodic scraping product status and price from e-commerce site
-
Periodic email notification of new deal information to user
-
Periodic end-to-end server health check
-
Alert for server infrastrucutre variation from aws sns event
-
Configuration by environment variable should be done before running the app.
- At:
env.prod.json
or.env.dev.json
file
- About:
DB_HOST
,DB_PORT
,DB_USERNAME
,DB_PASSWORD
,DB_DATABASE
: Database configurationsMAIL_HOST
,MAIL_PORT
,MAIL_AUTH_USER
,MAIL_AUTH_PASS
: SMTP server configurationsSG_ID
,SUBNET_ID
,ACCOUNT_ID
: AWS resource configurationsSLACK_WEBHOOK_URL
: Webhook URL for slack notification
{
"DB_HOST": "localhost",
"DB_PORT": 5432,
"DB_USERNAME": "postgres",
"DB_PASSWORD": "postgres",
"DB_DATABASE": "postgres",
"SLACK_WEBHOOK_URL": "https://hooks.slack.com/services/xxxxxxxxxxxxxxxxx",
"SG_ID": "sg-xxxxxxxxxxxxxxxxx",
"SUBNET_ID": "subnet-xxxxxxxxxxxxxxxxx",
"ACCOUNT_ID": "xxxxxxxxxxxxxxxxx",
"MAIL_HOST": "smtp.xxxxx.com",
"MAIL_PORT": 587,
"MAIL_AUTH_USER": "xxxxxxxxxxxxxxxxx",
"MAIL_AUTH_PASS": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
$ npm install
$ npm run offline
$ npm run deploy
type(scope): Subject
body
footer
feat
: A new featurefix
: A bug fixdocs
: Changes to documentationstyle
: Formatting, missing semi colons, etc; no code changerefactor
: Refactoring production codetest
: Adding tests, refactoring test; no production code changechore
: Updating build tasks, package manager configs, etc; no production code change
If you think a new commit type is needed, you can contribute by changing commitlint.config.js
and this paragraph.
master
: branch to manage only stable states deployed to productdevelop
: branch to integrate features to be deployed (development is mainly based on this branch)feature
: branch to develop new featureshotfix
: branch to correct urgent issues
- branch
feature
fromdevelop
-> develop features infeature
-> pull request todevelop
-> approve and merge todevelop
develop
become distributable -> mergedevelop
tomaster
, deploymaster
to product, add a version tag tomaster
- branch
hotfix
frommaster
-> fix issues inhotfix
-> pull request tomaster
-> approve and merge tomaster
anddevelop
feature/swm-issue#
ex) feature/swm-123