pres·ence
/ˈprezəns/
noun
the state or fact of existing, occurring, or being present in a place or thing.
.
├── /client/ # Client-side package
│ ├── /api/ # API model class definitions
│ ├── /dist/ # Client-side production build output folder
│ └── /src/ # View source code
│ ├── /components/ # Top-level React component package
│ │ ├── /pages/ # Page-level route-associated components
│ │ └── ... # Shared React components
│ ├── /helpers/ # Functional helpers
│ ├── /redux/ # Redux logic
│ ├── /themes/ # Themes folder
│ ├── /utils/ # Class helpers
│ ├── app.js # React root component
│ ├── index.js # Client-side startup script
│ └── styles.css # Global styles
├── /server/ # Server-side package
│ ├── /build/ # Server-side production build output folder
│ ├── /helpers/ # Server-side helper lib
│ ├── /middleware/ # Middleware server logic
│ ├── /users/ # MongoDB user schema model definition
│ ├── Dockerfile # Commands for building Docker image for production
│ ├── gulpfile.babel.js # Gulp tasks to compile server source files
│ ├── package.json # List of 3rd party libraries and utilities
│ └── server.js # Server-side startup script
├── docker-compose.yml # Commands to bring up app services
└── config.js # Environment variables config file
You can develop on this project in two ways:
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
http://localhost:8080
This will bring up the Redis and MongoDB containers and start up webpack-dev-server at http://0.0.0.0:8080
in a container and mount the /client
folder inside the frontend container so changes can be made live.
cd
to /client
folder in this reponpm install
npm run dev
Local webpack dev server will now be started at http://localhost:8080
.
cd
to /server
folder in this reporedis-server
to start up Redis servermongod
to start up MongoDB servernpm install
to install npm modulesnpm start
to build and start backend serverExpress server with redis and mongo clients will now be started at http://localhost:3000
.
docker-compose up
http://localhost:4000