- Development OS : MacOS Catalina(ver 10.15)
- Cloud Computing OS
- EC2 : ubuntu 18.04
- DB
- RDS : MySQL Community (v5.7.22)
- Redis: Elasticache Redis (v5.0.3)
- Storage : AWS S3
- Node.js : v12.13.0
- NPM: 6.12.1
- Always execute
npm update
- System setting
- Fork this project
- You must set-up the configure file
- Check config file below this wiki
- You must download library by using
npm install
. - Run express server.
node bin/www
andnpm start
- Before running server check the port.
- I have aws_s3.json file that configurate aws s3 automated set-up.
modules/image_upload.js
use auto set up aws s3.aws.config.loadFromPath(__dirname+'/../config/aws_s3.json');
inimage_upload.js
- There are almost express configuration contexts in
app.js
or/bin/www
-
Configuration file list
config/aws_s3.json - you can take in aws IAM config/fcm_key.json - google fcm service config/redis-config.json - local in development env - Elasticache in aws inMemory service config/sentry.json - this is error check service config/sequelize_config.json - ORM config file
-
aws_s3.json
{ "accessKeyId": "KeyId", "secretAccessKey": "AccesKey", "region": "ap-northeast-2" }
-
fcm_key.json
{ "student": { "type": "service_account", "project_id": "student_id", "private_key_id": "key_id", "private_key": "key_id", "client_email": "client_email", "client_id": "client_id", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/...." }, "trainer": { "type": "service_account", "project_id": "trainer_id", "private_key_id": "key_id", "private_key": "key_id", "client_email": "client_email", "client_id": "client_id", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/...." } }
-
redis_config.json
{ "development": { "host": "localhost", "port": "6379" }, "test": { }, "production": { "host": "Elasticache endpoint", "port": "6379" } }
-
sentry.json
{ "dsn": "https://[email protected]/.....", "environment": "development" }
-
sequelize_config.json
"development": { "username": "YOUR_DATABASE_USERNAME", "password": "YOUR_DATABASE_USER_PASSWORD", "database": "YOUR_DATABASE_NAME", "host": "AWS RDS End-point", "dialect": "mysql", "dialectOptions": { "useUTC": false, "dateStrings": true }, "timezone": "USER_TIMEZONE", "charset": "utf8", "collate": "utf8_general_ci" }, "test": { ... }, "production": { ... }
- PM2 Plus
- Node.js monitor APM tool
- AWS CloudWatch
- AWS cloud service 안정석 체크 tool
- Jmeter