xugy0926 / community

a community based on Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting Started

Requirements

  • Yarn package
  • Node.js v8.9.1 or newer
  • pm2 package

Data storage

  • mongodb

Quick Start

  1. Get the latest version
$ git clone https://github.com/xugy0926/community.git
$ cd community
  1. Run yarn install
$ yarn
  1. Modify src/config/index.dev.js

The three most important configurations

  1. Run dev
$ yarn run dev

Deploy

How to deploy

  1. Get the latest version
$ git clone https://github.com/xugy0926/community.git
$ cd community
$ yarn
  1. Create src/config/index.pro.js
$ yarn run config
  1. Modify src/config/index.pro.js

  2. Run production

$ yarn run build
$ NODE_ENV=production PORT=80 pm2 start dist/server.js --name "community"

or

$make depoly

How to update

$ git pull
$ yarn
$ yarn run build
$ pm2 stop community
$ pm2 start community

or

$ make update

pm2 deploy

pm2 deploy ecosystem.json production --force

About

a community based on Node.js

License:MIT License


Languages

Language:JavaScript 71.8%Language:HTML 23.4%Language:CSS 4.7%Language:Makefile 0.1%