First of all you must create database name as kampus and collection name as mahasiswa
- Start MongoDB shell
> use kampus
> db.createCollection('mahasiswa')
- Clone this repo,
$ git clone https://github.com/ariftoteles/Mongo-Express-ReactJs-NodeJs.git $ cd Mongo-Express-ReactJs-NodeJs
$ cd server
$ npm i
$ nodemon app.js
NodeJs server will run on localhost port 5000.
Open new terminal, change directory to folder client,
$ npm i
$ npm start
Reactjs will run on localhost port 3000, you can open browser and open localhost:3000