This project demonstrates basic CRUD operations along with user authentication using the MERN stack (MongoDB, Express.js, React.js, Node.js).
The project repository is organized into two main folders:
backend
: Contains the backend server code developed using Node.js and Express.js.frontend
: Contains the frontend client code developed using React.js.
To set up this project on your local machine, follow these steps:
Before you begin, make sure you have the following installed on your machine:
- Node.js: You can download and install Node.js from nodejs.org.
- MongoDB: You can download and install MongoDB from mongodb.com.
-
Clone the repository:
git clone https://github.com/yasirupanduka99/MERN_CRUD_Session_Y2S2.git
-
Navigate to the project directory:
cd MERN_CRUD_Session_Y2S2
-
Backend Setup:
cd backend
-
Create a
.env
file in thebackend
directory and add the following variables:PORT=5000 MONGO_URL=<your_mongo_db_connection_string> SECRET_TOKEN=<your_secret_token>
-
Install dependencies:
npm install
-
Start the backend server:
npm start
-
-
Frontend Setup:
cd ../frontend
-
Install dependencies:
npm install
-
Start the frontend development server:
npm start
-
-
Access the application:
Once the backend and frontend servers are running, you can access the application in your web browser at http://localhost:3000.
If you'd like to contribute to this project, feel free to fork the repository, make your changes, and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.