当前位置:网站首页>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
边栏推荐
- Bottom up - physical layer
- 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
- Hill sort c language
- [MySQL] log
- All the ArrayList knowledge you want to know is here
- leetcode刷题 (5.28) 哈希表
- 2022 Inner Mongolia latest construction tower crane (construction special operation) simulation examination question bank and answers
- [cloud native topic -45]:kubesphere cloud Governance - Introduction and overall architecture of enterprise container platform based on kubernetes
- Restore backup data on S3 compatible storage with br
- leetcode刷题 (5.31) 字符串
猜你喜欢
随机推荐
Analysis of pointer and array written test questions
Résumé des diagrammes de description des broches de la série ESP
China Light conveyor belt in-depth research and investment strategy report (2022 Edition)
From monomer structure to microservice architecture, introduction to microservices
synchronized 解决共享带来的问题
Use dumping to back up tidb cluster data to S3 compatible storage
Report on Market Research and investment prospects of China's silver powder industry (2022 Edition)
FairGuard游戏加固:游戏出海热潮下,游戏安全面临新挑战
Circular reference of ES6 module
【MySQL】日志
leetcode刷题 (5.28) 哈希表
704 二分查找
[research materials] 2021 live broadcast annual data report of e-commerce - Download attached
ESP系列引脚說明圖匯總
VMware 虚拟化集群
Migrate data from a tidb cluster to another tidb cluster
leetcode刷题 (5.31) 字符串
Leetcode skimming (5.29) hash table
PLT in Matplotlib tight_ layout()
Colorlog combined with logging to print colored logs