1、node+koa2+pm2+nginx
>nohup node server.js > server.log 2>&1 &
>nohup node db.js > db.log 2>&1 &
>ps -aux | grep nodejs
>netstat -tulpn
~~~
server {
listen 80;
server_name wangyi.ryloo.icu;
index index.php index.html;
root /www/wwwroot/wangyi/dist;
...
location /api/ {
root /www/wwwroot/wangyi;
index index.php index.html;
proxy_pass http://localhost:8889;
}
...
...
}
~~~