Welcome to the MERN Blog Project repository! This project serves as a starting point for developing web applications using the MERN stack, which includes MongoDB, Express.js, React.js, and Node.js.
Before you begin, ensure you have met the following requirements:
- Node.js installed on your local machine.
- MongoDB installed locally or access to a MongoDB instance (local or cloud-based).
To get started with this project, follow these steps:
-
Clone the repository to your local machine: git clone (https://github.com/aLamba570/mern-blog.git)
-
Navigate to the project directory: cd mern-blog
-
Install dependencies for both the server and client: npm install cd backend npm install cd .. cd frontend npm install
Add Start scripts
- Set up your environment variables:
- Create a
.env
file in the root directory based on the provided.env.example
. - Update the environment variables with your MongoDB connection URI and any other necessary configurations.
-
Start the development server: npm run dev
-
Open your browser and navigate to
http://localhost:3000
to view the React frontend.
The project structure is organized as follows:
frontend/
: Contains the React.js frontend code.backend/
: Contains the Node.js and Express.js backend code.public/
: Contains static files for the frontend.models/
: Contains database models (if applicable).routes/
: Contains Express.js routes.controllers/
: Contains controllers for handling business logic.middlewares/
: Contains custom middleware functions (if applicable).config/
: Contains configuration files (e.g., database configuration, environment variables).
Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or create a pull request.
This project is licensed under the MIT License.