当前位置:网站首页>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
边栏推荐
- 使用 BR 恢复 S3 兼容存储上的备份数据
- Huawei cloud OBS file upload and download tool class
- 移位运算符
- Vocabulary notes for postgraduate entrance examination (3)
- [MySQL] log
- Cisp-pte practice explanation
- 2022 Inner Mongolia latest construction tower crane (construction special operation) simulation examination question bank and answers
- 根据csv文件某一列字符串中某个数字排序
- sys.argv
- [secretly kill little partner pytorch20 days -day01- example of structured data modeling process]
猜你喜欢
指针和数组笔试题解析
[cloud native topic -45]:kubesphere cloud Governance - Introduction and overall architecture of enterprise container platform based on kubernetes
【MySQL】鎖
Deep learning: derivation of shallow neural networks and deep neural networks
synchronized 解决共享带来的问题
Pyqt5 development tips - obtain Manhattan distance between coordinates
Chrome浏览器的crash问题
[research materials] 2022 China yuancosmos white paper - Download attached
Wincc7.5 download and installation tutorial (win10 system)
Verrouillage [MySQL]
随机推荐
Rviz仿真时遇到机器人瞬间回到世界坐标原点的问题及可能原因
[secretly kill little partner pytorch20 days -day01- example of structured data modeling process]
China vanadium battery Market Research and future prospects report (2022 Edition)
[MySQL] database stored procedure and storage function clearance tutorial (full version)
Wincc7.5 download and installation tutorial (win10 system)
Hcip day 16
Analysis of pointer and array written test questions
远程存储访问授权
Analysis of Top1 accuracy and top5 accuracy examples
[research materials] 2022 enterprise wechat Ecosystem Research Report - Download attached
IOT -- interpreting the four tier architecture of the Internet of things
【ROS】usb_cam相机标定
The resources of underground pipe holes are tight, and the air blowing micro cable is not fragrant?
Bottom up - physical layer
Roguelike游戏成破解重灾区,如何破局?
游戏解包的危害及资源加密的重要性
China polyether amine Market Forecast and investment strategy report (2022 Edition)
Colorlog结合logging打印有颜色的日志
hcip--mpls
FairGuard游戏加固:游戏出海热潮下,游戏安全面临新挑战