We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://velog.io/@unchapterd/%EA%B5%AC%ED%98%84-Reverse-Proxy-Server
curl -s https://deb.nodesource.com/setup_16.x | sudo bash sudo apt update sudo apt install nodejs sudo node -v sudo npm -v sudo git -v sudo npm install pm2 -g sudo npm ls -g sudo git clone -b submain https://github.com/motd-5/motd-backend project ls cd /home/ubuntu/project sudo npm ci cd /home/ubuntu/project/src/sequelize sudo mkdir seeders sudo mkdir config cd /home/ubuntu/project/src/sequelize/config sudo nano config.json
{ "development": { "username": "root", "password": "RDS-비밀번호", "database": "RDS-DB-이름", "host": "RDS-주소값", "dialect": "mysql" }, "test": { "username": "root", "password": "RDS-비밀번호", "database": "database_test", "host": "RDS-주소값", "dialect": "mysql" }, "production": { "username": "root", "password": "RDS-비밀번호", "database": "database_production", "host": "RDS-주소값", "dialect": "mysql" } }
-- Ctrl + O > Enter : 저장 -- Ctrl + X : 저장이 완료되었을 때는 바로 나와지고, 그렇지 않을 때는 아래 읽어보면 됨...
cat config.js
RDS 의 보안그룹을 [project-secrutiy-group] 으로 선택해주세요.
cd /home/ubuntu/project/src/sequelize npx sequelize db:create npx seqeulize db:migrate cd /home/ubuntu/project npm run dev pm2 start ./src/index.js
sudo apt install nginx cd /etc/nginx/sites-enabled sudo nano 도메인-주소
server { listen 80; listen [::]:80; location / { proxy_pass http://127.0.0.1:3000; } }
cd /etc/nginx sudo nano nginx.conf
# server_names_hash_bucket_size 64;
#
include /etc/nginx/sites-enabled/*;
include /etc/nginx/sites-enabled/도메인-주소;
The text was updated successfully, but these errors were encountered:
unchaptered
No branches or pull requests
Express + PM2 + Nginx 배포
https://velog.io/@unchapterd/%EA%B5%AC%ED%98%84-Reverse-Proxy-Server
1단계 : AWS 설정
보안 그룹 생성 : 이름 가제 [project-security-group]
EC2 인스턴스 생성 : 이름 가제 [project-server]
Node 설치 및 기본설정
-- Ctrl + O > Enter : 저장
-- Ctrl + X : 저장이 완료되었을 때는 바로 나와지고, 그렇지 않을 때는 아래 읽어보면 됨...
cat config.js
RDS 설정
RDS 의 보안그룹을 [project-secrutiy-group] 으로 선택해주세요.
Npx Sequelize 실행
2단계 : Nginx
sudo apt install nginx cd /etc/nginx/sites-enabled sudo nano 도메인-주소
cd /etc/nginx sudo nano nginx.conf
# server_names_hash_bucket_size 64;
구문을 찾아서#
주석 표시용 문구를 지워주세요include /etc/nginx/sites-enabled/*;
구문을 찾아서include /etc/nginx/sites-enabled/도메인-주소;
로 변경해주세요.The text was updated successfully, but these errors were encountered: