nenet node server

DevYK 1502bc99c8 fix 归集队列 bug 3 years ago
bin 6c7023d2a0 denet server init 3 years ago
config 2b1644f5ed fix 归集队列 bug 3 years ago
model 1502bc99c8 fix 归集队列 bug 3 years ago
public 6c7023d2a0 denet server init 3 years ago
routes 808d64b5ac update healthcheck 3 years ago
test 2b1644f5ed fix 归集队列 bug 3 years ago
views 6c7023d2a0 denet server init 3 years ago
.env.example acda782535 读取 env 解密私钥 3 years ago
.gitignore 02da05feb6 add log 3 years ago
README.md 808d64b5ac update healthcheck 3 years ago
app.js 02da05feb6 add log 3 years ago
package-lock.json 48ee3b6edb bug fix 3 years ago
package.json 48ee3b6edb bug fix 3 years ago

README.md

安装必要的库

npm install

配置环境变量

vim ~/.bashrc
export DENET_CRYPT_KEY=
export DENET_CRYPT_IV=
source ~/.bashrc

启动

<!-- 开发环境启动 -->
NODE_ENV=dev ./node_modules/.bin/nodemon bin/www
<!-- 测试环境启动-->
NODE_ENV=test pm2 start bin/www
<!-- 线上环境启动 -->
NODE_ENV=prd pm2 start bin/www

健康检查

http://localhost:3000/healthcheck

进入 server 看 log


ssh -i de-net.pem ubuntu@34.207.131.244

sudo   su root

ssh    10.0.1.168

docker ps

docker ps  -a

docker exec  -it   容器id   bash

pm2 logs

文档