当前位置:网站首页>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
边栏推荐
- Ruffian Heng embedded bimonthly, issue 49
- C language - bit segment
- China polyether amine Market Forecast and investment strategy report (2022 Edition)
- Leetcode question brushing (5.28) hash table
- Yyds dry goods inventory three JS source code interpretation eventdispatcher
- 图像融合--挑战、机遇与对策
- 从 TiDB 集群迁移数据至另一 TiDB 集群
- leetcode刷题 (5.29) 哈希表
- 【MySQL】鎖
- China vanadium battery Market Research and future prospects report (2022 Edition)
猜你喜欢
vulnhub hackme: 1
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
【MySQL】日志
【MySQL】鎖
C语言自定义类型:结构体
Chinese Remainder Theorem (Sun Tzu theorem) principle and template code
Fibonacci sequence
MySQL learning records 12jdbc operation transactions
【刷题】牛客网面试必刷TOP101
2022.02.13 - 238. Maximum number of "balloons"
随机推荐
Mobile Test Engineer occupation yyds dry goods inventory
Hcip day 16
灰度升级 TiDB Operator
ESP系列引脚說明圖匯總
hcip--mpls
MySQL learning records 12jdbc operation transactions
【MySQL】日志
MySQL learning record 07 index (simple understanding)
leetcode刷题 (5.28) 哈希表
2022.02.13 - NC001. Reverse linked list
从 TiDB 集群迁移数据至另一 TiDB 集群
【云原生】手把手教你搭建ferry开源工单系统
Use Alibaba icon in uniapp
[research materials] 2022 China yuancosmos white paper - Download attached
[luatos-air551g] 6.2 repair: restart caused by line drawing
China vanadium battery Market Research and future prospects report (2022 Edition)
Erc20 token agreement
Image fusion -- challenges, opportunities and Countermeasures
pcd转ply后在meshlab无法打开,提示 Error details: Unespected eof
指针进阶---指针数组,数组指针