Skip to content

spital/mern-mongo-express-react-nodejs-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React example full stack app

MongoDB, React, Node and Express (MERN)

Original source from Let’s build a full stack MongoDB, React, Node and Express (MERN) app and associated github.

Errors fixed, packages upgraded, vulnerabilities corrected, amended with Docker use.

TODO : use Docker Compose and NginX to proxy ports.

Requirements

Install Docker Engine.

Install Docker Compose.

Install git.

Build

Please note this is example development build.

git clone https://github.com/spital/mern-mongo-express-react-nodejs-example
cd mern-mongo-express-react-nodejs-example
docker build -t ern-crud .

Run

docker run -d -p 27017:27017 --name mongo7 mongo:7-jammy
sleep 5
docker inspect mongo7 | grep IPAddress
export REACT_APP_MONGO_IP=172.17.0.5   ## <<== here your ip address
export REACT_APP_MONGO_PORT=27017
export REACT_APP_API_IP=localhost
export REACT_APP_API_PORT=3001
docker run -d -e REACT_APP_MONGO_IP -e REACT_APP_MONGO_PORT -e REACT_APP_API_IP -e REACT_APP_API_PORT -p3000:3000 -p3001:3001 ern-crud

Use

Start web browser and go to (http://localhost:3000/).

The result shall be something like this : React example app screenshot

About

MongoDB, React, Node and Express (MERN) app full stack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors