当前位置:网站首页>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
边栏推荐
- Huawei cloud OBS file upload and download tool class
- 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
- Chrome浏览器的crash问题
- 移位运算符
- Sort according to a number in a string in a column of CSV file
- Fibonacci sequence
- Report on Market Research and investment prospects of China's silver powder industry (2022 Edition)
- Rviz仿真时遇到机器人瞬间回到世界坐标原点的问题及可能原因
- Upgrade tidb operator
- Nacos Development Manual
猜你喜欢
[cloud native] teach you how to build ferry open source work order system
指针和数组笔试题解析
[research materials] 2022 China yuancosmos white paper - Download attached
JVM 快速入门
C语言自定义类型:结构体
All the ArrayList knowledge you want to know is here
Nacos Development Manual
synchronized 解决共享带来的问题
指针进阶---指针数组,数组指针
2. File operation - write
随机推荐
[cloud native topic -45]:kubesphere cloud Governance - Introduction and overall architecture of enterprise container platform based on kubernetes
图像融合--挑战、机遇与对策
Pyqt5 development tips - obtain Manhattan distance between coordinates
游戏解包的危害及资源加密的重要性
指针进阶---指针数组,数组指针
面向个性化需求的在线云数据库混合调优系统 | SIGMOD 2022入选论文解读
Golang force buckle leetcode 1020 Number of enclaves
使用 Dumpling 备份 TiDB 集群数据到兼容 S3 的存储
ROS编译 调用第三方动态库(xxx.so)
【刷题】牛客网面试必刷TOP101
IP lab, the first weekly recheck
What is the use of entering the critical point? How to realize STM32 single chip microcomputer?
IOT -- interpreting the four tier architecture of the Internet of things
Analysis of Top1 accuracy and top5 accuracy examples
Introduction to number theory (greatest common divisor, prime sieve, inverse element)
JVM 快速入门
从 CSV 文件迁移数据到 TiDB
【MySQL】数据库的存储过程与存储函数通关教程(完整版)
CISP-PTE实操练习讲解
堆排序详解