This is a MERN (MongoDB, Express, React, Node.js) blog application with front-end built using ReactJS and Vite, back-end built with NodeJS and Express, and data stored in MongoDB using Mongoose. The application also uses TailwindCSS for styling and React-Router for client-side routing. Postman can be used to test the backend API.
Make sure you have the following software installed on your system:
- Node.js and npm (Node Package Manager)
- MongoDB
- Clone the repository:
- Navigate to the frontend directory:
- Install the dependencies:
- Start the development server:
- The frontend will be running at http://localhost:3000.
- Navigate to the backend directory:
- Install the dependencies:
- Set up the MongoDB connection:
- Make sure your MongoDB server is running.
- Create a
.env
file in thebackend
directory and add your MongoDB connection URL as follows: MONGO_URI=<HERE_GOES_YOUR_MONGODB_URI>
- Start the backend server:
- The backend will be running at http://localhost:8000.
You can use Postman to test the backend API endpoints:
- Open Postman and create a new request.
- Set the request type (GET, POST, etc.) and URL to http://localhost:8000/api/posts or any other available API endpoint.
- Add headers or body if required for the specific request type.
- Send the request and inspect the response.
- User authentication and authorization (ongoing).
- CRUD operations for blog posts. (ongoing)
- Infinite scrolling for blog posts. (ongoing)
Feel free to explore the code and customize the application as per your requirements. PR and contributions are much appreciated.
๐ P.S. - The project will be migrated to TypeScript soon.
Happy coding! ๐