This is a platform for Niviba transportation logistic project. The project includes the backend design of a MERN stack application and the design of database models.
JavaScript
Niviba Website
AUthor: Alex Nguyen - Gettysburg College
This repo includes: Server : Nodejs based, and Client: React based.
Set up database
Create .env file
# .env
PORT=8080
NODE_ENV=development
USE_DOCKER=FALSE
# USE_DOCKER=TRUE if you run the website with docker
Now we start running the application:
Install modules:
cd ./client-react && npm i && cd ../server && npm i && cd ..
Start client:
cd ./client && npm start && cd ..
Start server:
cd ./server && npm start
If you want to run server and database on Docker
# Start the server with building server and database in docker
docker-compose up --build
Inspect database inside docker
# Get name of mongo server
docker ps
# Get in to docker mongo container
docker exec -it <mongo server name> /bin/bash
mongo
# Inspect database with mongo container bash with mongo shell