当前位置:网站首页>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
边栏推荐
- 指针进阶---指针数组,数组指针
- [MySQL] log
- 指针和数组笔试题解析
- VMware virtualization cluster
- 图像融合--挑战、机遇与对策
- 2022 Inner Mongolia latest water conservancy and hydropower construction safety officer simulation examination questions and answers
- Colorlog combined with logging to print colored logs
- JVM performance tuning and practical basic theory - Part 1
- C语言 - 位段
- ESP series pin description diagram summary
猜你喜欢
[MySQL] database stored procedure and storage function clearance tutorial (full version)
Configuring OSPF load sharing for Huawei devices
C language - bit segment
FairGuard游戏加固:游戏出海热潮下,游戏安全面临新挑战
[MySQL] log
【MySQL】数据库的存储过程与存储函数通关教程(完整版)
hcip--mpls
C语言 - 位段
Circular reference of ES6 module
根据csv文件某一列字符串中某个数字排序
随机推荐
Remote storage access authorization
China's high purity aluminum target market status and investment forecast report (2022 Edition)
China high purity silver nitrate Market Research and investment strategy report (2022 Edition)
logback1.3. X configuration details and Practice
Cisp-pte practice explanation
Introduction to number theory (greatest common divisor, prime sieve, inverse element)
[research materials] 2022 enterprise wechat Ecosystem Research Report - Download attached
Permutation and combination function
2. File operation - write
化不掉的钟薛高,逃不出网红产品的生命周期
synchronized 解决共享带来的问题
【ROS】usb_cam相机标定
【MySQL】日志
IoT -- 解读物联网四层架构
MySQL learning record 11jdbcstatement object, SQL injection problem and Preparedstatement object
[2022 Guangdong saim] Lagrange interpolation (multivariate function extreme value divide and conquer NTT)
CISP-PTE实操练习讲解
Online yaml to CSV tool
MySQL learning record 07 index (simple understanding)
指针进阶---指针数组,数组指针