- Yarn package
- Node.js v8.9.1 or newer
- pm2 package
- mongodb
- Get the latest version
$ git clone https://github.com/xugy0926/community.git
$ cd community
- Run yarn install
$ yarn
- Modify src/config/index.dev.js
The three most important configurations
- mongodb
- github,获取 github 登录用的信息请参考 https://github.com/settings/developers
- Run dev
$ yarn run dev
- Get the latest version
$ git clone https://github.com/xugy0926/community.git
$ cd community
$ yarn
- Create src/config/index.pro.js
$ yarn run config
-
Modify src/config/index.pro.js
-
Run production
$ yarn run build
$ NODE_ENV=production PORT=80 pm2 start dist/server.js --name "community"
or
$make depoly
$ git pull
$ yarn
$ yarn run build
$ pm2 stop community
$ pm2 start community
or
$ make update
pm2 deploy ecosystem.json production --force