当前位置:网站首页>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
边栏推荐
- 2022.02.13 - NC003. Design LRU cache structure
- Use Alibaba icon in uniapp
- 游戏解包的危害及资源加密的重要性
- pcd转ply后在meshlab无法打开,提示 Error details: Unespected eof
- 1. Color inversion, logarithmic transformation, gamma transformation source code - miniopencv from zero
- JVM performance tuning and practical basic theory - Part 1
- 2022.02.13 - 238. Maximum number of "balloons"
- From monomer structure to microservice architecture, introduction to microservices
- Leetcode question brushing (5.31) string
- Char to leading 0
猜你喜欢
Circular reference of ES6 module
CISP-PTE实操练习讲解
Let the bullets fly for a while
JVM 快速入门
IP lab, the first weekly recheck
JVM performance tuning and practical basic theory - Part 1
What is the use of entering the critical point? How to realize STM32 single chip microcomputer?
[brush questions] top101 must be brushed in the interview of niuke.com
C language custom type: struct
Chrome浏览器的crash问题
随机推荐
ESP series pin description diagram summary
leetcode刷题 (5.28) 哈希表
图像融合--挑战、机遇与对策
Colorlog combined with logging to print colored logs
[MySQL] database stored procedure and storage function clearance tutorial (full version)
华为云OBS文件上传下载工具类
Vocabulary notes for postgraduate entrance examination (3)
How to use information mechanism to realize process mutual exclusion, process synchronization and precursor relationship
使用 TiUP 升级 TiDB
MySQL learning record 10getting started with JDBC
2022.02.13 - NC001. Reverse linked list
1204 character deletion operation (2)
Tidb backup and recovery introduction
PLT in Matplotlib tight_ layout()
C语言自定义类型:结构体
vulnhub hackme: 1
China high purity silver nitrate Market Research and investment strategy report (2022 Edition)
Pointer advanced --- pointer array, array pointer
The resources of underground pipe holes are tight, and the air blowing micro cable is not fragrant?
Zhong Xuegao, who cannot be melted, cannot escape the life cycle of online celebrity products