Git Product home page Git Product logo

store-man's Introduction

STORE MAN,

[][][][][][][][][][][]

Table of content :

Prerequisites

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.

Available Scripts

In the project directory, you can run:

npm run mongodb

Runs MongoDB daemon.

npm run server:dev

Runs the API in development mode.

npm run server:prod

Runs the API in production mode.

npm run client:dev

It runs the React app with webpack-dev-server.
Open up http://localhost:8080 on the Browser.

npm run client:build

Bundles the React app for production in /client/build folder.

npm run static

Runs a static server located in ./static/"html"

Configs indications

  • 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
  • Used Ports

    • Server, development and production ports setup in ecosystem.
    • React/Redux development mode, get a look into webpack PORT variable.
    • MongoDB, we use default configuration. Feel free to setup new values in mongodb.sh
  • 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).

Metrics and Monitoring

  • 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 and pm2 monit, further command cheatsheet ...

store-man's People

Contributors

quborg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.