Mariojey / Employees

MERN CRUD app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Employee

CRUD app made in MERN - mongo, express.js, react.js, node.js theme.

Gif

If you want run this app on your computer/serwer first you had to install mongodb on your device (Download here!). Second node.js with npm manager is necessary for running this app (Download here!)


Run app

Start backend

cd /backend
npm install

Next you must create .env file in bckend directory. File should look like this

MONGODB_URI = mongodb://127.0.0.1:27017/<Name_Your_Schema>
PORT = <Port which app listen on running>
JWT_SECRET = <Random key for authorization>

Finally, you can start backed with command:

npm run devWatch

Start frontend

cd ..
cd /frontend
npm install
npm run start

Packages

List of all packages and libraries which you have installed you can find in:

  1. Backend - Here
  2. Frontend - Here

Below you can see all packages which I've installed.

Logs

You can read all of application's logs in log.log file here Logs are generated by scripts using winston library

Database Schema

Exported collection from schema is here in json file. You can import this in mongodb compass, but it is not necessary for running if you created empty schema you can insert data into database in app.

Bugs

If you got an error and blank page check if you opened backend adress in frontend proxy.

Go to ./frontend/package.json And add on the top of file

"proxy": "http://localhost:<Port_which_is_using_in_backend>",

About

MERN CRUD app


Languages

Language:JavaScript 82.5%Language:CSS 14.7%Language:HTML 2.8%