[][][][][][][][][][][]
Make sure you have :
- NodeJS(>=8.9.4)
- MongoDB(>=3.0)
/bin/bash
environment available for current unix user.- Install project dependencies
npm install
. - (optional) Install PM2 globally
npm install -g pm2
. - (recommended) Use Yarn over NPM.
In the project directory, you can run:
Runs MongoDB daemon.
Runs the API in development mode.
Runs the API in production mode.
It runs the React app with webpack-dev-server
.
Open up http://localhost:8080 on the Browser.
Bundles the React app for production in /client/build
folder.
Runs a static server located in ./static/"html"
-
MongoDB
- By default now,
/server/mongodb/
is the database location, you can specify your own in/server/services/mongodb.sh
. - A straightforward command :
mongod -dbpath '~/MongoDB' --port 10007 --bind_ip 127.0.0.1,192.167.0.1
- By default now,
-
Used Ports
-
Redux Store
- After a successful authentication, we use Saga middleware to fire up data on the browser with multiple async calls to API and finally mount Redux store at once (escape side effect multiple React app updates).
- PM2 an advanced process manager and straightforward to use (start/stop/restart/delete/show/monit).
- Use
pm2 list
to list available apps and get some information about the process. The setup is here ecosystem. - Start server and mongodb with pm2 :
pm2 start [app-name]|[pid]
, example :pm2 start api-store-man
. - Stoping a process :
pm2 stop api-store-man
. - Clear config and reload ecosystem :
pm2 delete id|name|all
,pm2 reload ecosystem.config.js --only api-store-man
, omit--only
to reload all apps. - To monitor the resource usage use
pm2 imonit
andpm2 monit
, further command cheatsheet ...