当前位置:网站首页>egg. JS project deployment online server
egg. JS project deployment online server
2022-07-06 08:29:00 【Liu Chu, Ge Nian】
First step : Domain name resolution , Create a website 
Mount the pagoda , Initializing some software 
Then create a website :
The second step : Upload and unzip
The third step : install pm2(node Environmental Science ), Switch node Version to the latest version , install redis
Step four : Open the command line , Switch to the root directory
Step five : If it is a domestic server , Switch the image first :
npm config set registry https://registry.npm.taobao.org
If it is a foreign server, you don't need it , For example, Hong Kong server
Step six : perform npm install
Step seven : Install the database migration tool npm install --save-dev sequelize-cli
Step eight : Modify configuration information :
config/config.default.js
sequelize To configure
oss To configure
...
database/config.json
Database related information
Step nine : Execute the migration command npx sequelize db:migrate
Step 10 :npm start
Step 11 : Add reverse proxy
Add the configuration :
location /ws
{
proxy_pass http://127.0.0.1:7001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-Real-IP $remote_addr;
}
Manually add reverse proxy 
The twelfth step : Modify the front-end project /common/lib/config.js and manifest.json The domain name inside is ok
边栏推荐
- C language custom type: struct
- Summary of MySQL index failure scenarios
- [MySQL] lock
- Use dumping to back up tidb cluster data to S3 compatible storage
- sys.argv
- MySQL learning record 10getting started with JDBC
- [research materials] 2021 China online high growth white paper - Download attached
- The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
- Pointer advanced --- pointer array, array pointer
- [2022 广东省赛M] 拉格朗日插值 (多元函数极值 分治NTT)
猜你喜欢
随机推荐
Precise query of tree tree
On the day of resignation, jd.com deleted the database and ran away, and the programmer was sentenced
Chinese Remainder Theorem (Sun Tzu theorem) principle and template code
IP lab, the first weekly recheck
Use dumping to back up tidb cluster data to S3 compatible storage
Introduction to number theory (greatest common divisor, prime sieve, inverse element)
matplotlib. Widgets are easy to use
指针进阶---指针数组,数组指针
China dihydrolaurenol market forecast and investment strategy report (2022 Edition)
[research materials] 2021 China online high growth white paper - Download attached
【MySQL】数据库的存储过程与存储函数通关教程(完整版)
1204 character deletion operation (2)
Fibonacci sequence
Modify the video name from the name mapping relationship in the table
从表中名称映射关系修改视频名称
JVM 快速入门
升级 TiDB Operator
使用 BR 恢复 S3 兼容存储上的备份数据
[2022 Guangdong saim] Lagrange interpolation (multivariate function extreme value divide and conquer NTT)
Résumé des diagrammes de description des broches de la série ESP






![Verrouillage [MySQL]](/img/ce/9f8089da60d9b3a3f92a5e4eebfc13.png)


