Main API server for Macguider
- Provides API logics for interaction with users on the web frontend
- Provides (access-restricd) API for internal data processing from other microservices
Configuration by environment variable should be done before running the app.
- At:
.envfile
- About:
APP_PORT: Application listening portDB_HOST,DB_PORT,DB_USERNAME,DB_PASSWORD,DB_DATABASE: Database configurationsMAIL_HOST,MAIL_PORT,MAIL_AUTH_USER,MAIL_AUTH_PASS: SMTP server configurationsS3_REGION,S3_BUCKET,S3_AUTH_PATH,S3_AUTH_PASS: S3 image server configurationsADMIN_ALLOW_IPS: Whitelisting access from other microservices by IPs
APP_PORT=3000
DB_HOST="localhost"
DB_PORT=5432
DB_USERNAME="postgres"
DB_PASSWORD="postgres"
DB_DATABASE="postgres"
MAIL_HOST="email-smtp.ap-northeast-2.amazonaws.com"
MAIL_PORT=587
MAIL_AUTH_USER="MAIL_AUTH_USER",
MAIL_AUTH_PASS="MAIL_AUTH_PASS"
S3_REGION="ap-northeast-2"
S3_BUCKET="macguider-images"
S3_AUTH_USER="S3_AUTH_USER"
S3_AUTH_PASS="S3_AUTH_PASS"
ADMIN_ALLOW_IPS="127.0.0.1,127.0.0.2"
$ npm install$ npm run start:local$ npm run start:prod
$ npm run start:dev$ npm run build
$ npm run start:prodtype(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
featurefromdevelop-> develop features infeature-> pull request todevelop-> approve and merge todevelop developbecome distributable -> mergedeveloptomaster, deploymasterto product, add a version tag tomaster- branch
hotfixfrommaster-> fix issues inhotfix-> pull request tomaster-> approve and merge tomasteranddevelop
feature/swm-issue#
ex) feature/swm-123