The blog application allows users to create, manage, and view blog posts. Each blog post is associated with an author and may include additional features such as commenting, categories, and publishing dates.
- Node.js - JavaScript runtime for building server-side applications.
- Express.js - Web framework for Node.js.
- TypeScript - JavaScript with type annotations.
- MongoDB - NoSQL database for data storage.
- Mongoose - MongoDB object modeling tool for Node.js.
- ESLint - Linter for identifying and fixing problems in JavaScript code.
- Prettier - Code formatter for maintaining consistent code style.
- User Authentication and Authorization
- Mongoose schema validation with proper error message
- Blog Management
- Search and Filtering on Blogs
Before you begin, ensure you have met the following requirements:
- Node.js and npm installed on your machine.
- MongoDB instance running locally or a cloud MongoDB database.
Follow these steps to set up and run the project locally.
https://github.com/Al-amin07/backend_project_3Navigate to the project directory and install the necessary dependencies:
cd backend_project_3
npm installCreate a .env file in the root of the project to store environment variables, such as MongoDB URI or any secret keys. Here’s an example:
PORT=6000
mongodb+srv://project3:c8S2MT1C3ONlIB9q@cluster0.pekpvn6.mongodb.net/project_3?retryWrites=true&w=majority&appName=Cluster0- Development Mode To start the project in development mode with hot reloading:
npm run start:dev- Production Mode If you prefer to run the project in production mode:
npm run build
npm run start