yinanfang / DBDCapital-Node

DBD Capital company website with Node.js & React
https://dbd-capital.com/
1 stars 0 forks source link
async-await babel es6 express flow jasmine material-ui mongoose nodejs parse-server react redux-saga supertest webpack

DBDCapital-Node

Short Intro

Isomorphic Application

Dev Quick Start

    npm install -g flow-bin
    npm install

    # Upload env & SSL files from local. See key.txt for command

    make dev

    # Install correct eslint: https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb#eslint-config-airbnb-1

Production Quick Start

    # Fresh start
    make build && make pm2

    # Update & Restart
    make updateAndRestart

    # Update db if there's schema change. See key.txt for details

    ##############################################################################
    # Options
    # Start with babel-node
    sudo NODE_ENV=production ./node_modules/babel-cli/bin/babel-node.js server
    # One line start
    sudo pm2 start index.js --no-daemon
    # pm2 list
    sudo pm2 list
    # pm2 start with .json
    sudo pm2 start pm2_config.json

Unsecure dev page

Secure dev page

Dependency update

    # Check available upgrades
    ncu
    # Take a look at the update and handle minor version updates first
    npm update
    # Check Github release updates and handle each major update carefully. Run the tests!
    ncu -u webpack
    npm update
    # Update package.json to include the previous minor version updates too
    ncu -a

MongoLab - Robomongo

Linter setup

  $ npm install --save-dev eslint eslint-plugin-react babel-eslint eslint-config-airbnb
  Install linter-eslint and react from "Install"
  Completely close and restart Atom

Demo for external user NOT under the same wifi

Note

https://medium.com/@dan_abramov/react-components-elements-and-instances-90800811f8ca#.cx6foekli https://medium.com/@housecor/react-stateless-functional-components-nine-wins-you-might-have-overlooked-997b0d933dbc#.mzql1zm99

Unused packages