STUDENT DATABASE is a MERN based CRUD application. Using this app you can perform 4 basic operations such as Create , update , read and delete operations on a simple Student database.
- /db : Contains Configuration and User model.
- /Routes : Contains API routes and Swagger docs.
- /test : Contains Unit tests using Chai and mocha.
- /.env : Contains PORT and mongodb connection string.
- /index.js : Contains Swagger config and Express app.
- /seed.js : Contains script to seed data.
- /src : Contains Components , assets and Css.
- /.env : Contains Firebase Config , React app PORT
- Make sure you have Nodejs and mongoDb installed in your computer (Mongo db compass is recommended).
- In mongodb copy the connection string and paste it inside the Backend/.env file in MONGODB_URI , make sure to follow the syntax.
- I am using default 5000 port you can choose according to your machine.
- Click on connect in mongodb compass to run the project.
- Inside tha backend folder run command:
nodemon
Clone the project
git clone https://github.com/27Shri03/Student-Database.git
Go to the project directory
cd Student-Database
Install dependencies
npm install
Start the server
npm run dev
Using this file you can populate your database so that you can test API endpoints using Swagger API testing and work on the data initially.
- In backend folder run this command:
node seed.js
On frontend , log in with the given email and password :
- EMAIL : [email protected]
- PASSWORD: test123
After logging in with any account we can perform swagger API testing. Click on the Swagger API testing button to proceed with testing.
To run tests, run the following command in the backend folder
npm test