[![GitHub contributors](https://img.shields.io/github/contributors/Namanl2001/MERN-Gurujii-dev.svg)](https://github.com/Namanl2001/MERN-Gurujii-dev/graphs/contributors/) [![Issues](https://img.shields.io/github/issues/Namanl2001/MERN-Gurujii-dev)](https://github.com/Namanl2001/MERN-Gurujii-dev/issues) [![PRs](https://img.shields.io/github/issues-pr/Namanl2001/MERN-Gurujii-dev)](https://github.com/Namanl2001/MERN-Gurujii-dev/pulls) [![Forks](https://img.shields.io/github/forks/Namanl2001/MERN-Gurujii-dev?style=social)](https://github.com/Namanl2001/MERN-Gurujii-dev) [![Stars](https://img.shields.io/github/stars/Namanl2001/MERN-Gurujii-dev?style=social)](https://github.com/Namanl2001/MERN-Gurujii-dev)
We have created this platform to help students find the best tuition teachers in their city quite easily. You just have to enter the pin code of your city and we will show you the best teachers in your locality along with their teaching styles and their qualification from which you can select the best teacher for yourself.
# Clone this repository
$ git clone https://github.com/your-username/MERN-Gurujii-dev.git
# Go into the repository
$ cd MERN-Gurujii-dev
# Install dependencies
$ yarn dep0
$ yarn dep1
# Run website
$ yarn dev
This should launch the website on localhost:3000
.
We have used proxy so all the requests made to the backend from the frontend will be served at
localhost:5000
at which our backend is running.
- This project uses yarn to install the dependencies. Don't use npm install. - To run the app locally, if you do not want to use the database at all, comment out the lines that reference the `backend/config.js` file: - Lines 9, 40 of `backend/server.js` - Line 3 of `backend/controllers/user.controller.js` - There is a route that sends emails - Line 82 of `backend/controllers/user.controller.js`. Remember to replace the auth credentials with your own before testing the route. - Remember not to push any personal data like mongo uri or mail credentials.
- Install dependencies theough `yarn` by navigating to the backend folder. ``` # Go into backend folder $ cd backend # Install dependencies $ yarn install ```
- For security reasons, we have made the MongoDb URI secure, by not adding a hardcoded username and password. For development purposes, you can install, MongoDB locally or use the online version. Create a .env file same as the given env file (.env.example) in backend - `MONGODB` is for API calls - `MONGODB_TEST_URI` is for unit test cases
- You have to start MongoDB server locally to establish a database connection. - Also create your own `backend/config.js` file with proper credentials, following the format given in `backend.config.example/js`.
- The project uses `nodemon` as a devDependency for runnning backend in development mode. ``` # run in development mode $ yarn dev ```
- Once the server is up and running, you will see two messages in terminal : - Server is running on port: 5000 - MongoDB database connection established successfully - Now your backend is running successfully in development mode.
Contributions are very welcome! See our CONTRIBUTING.md for more information.
- To view on mobile, your laptop and mobile phone should be on the same network.
- Run ipconfig on the terminal, enter `