Overview :
This repository encapsulates my successful completion of the second technical round's MERN stack task. From MongoDB to Express.js, React.js, and Node.js, this project demonstrates my proficiency in building robust full-stack applications.
Highlights
Tech Stack Mastery: Leveraged MongoDB for the database, utilized Express.js for server-side logic, implemented a dynamic front end with React.js, and ensured smooth integration using Node.js.
Code Quality: Emphasized clean and modular code practices, making the codebase easy to understand, maintain, and scale.
# If any additional dependencies are required for running the project, kindly install them. I will provide you with
the necessary packages, and if you find any missing, please install them as needed for smooth execution.
npm install react react-dom redux react-redux @reduxjs/toolkit axios express mongoose cors body-parser mongodb
npm install @mui/material @emotion/react @emotion/styled # Or install Bootstrap for styling crate server.js
// Import necessary modules Connect to MongoDB mongoose.connect('mongodb://localhost:27017/blog', { useNewUrlParser: true }) .then(() => console.log('MongoDB connected')) .catch(err => console.error(err));
// Define Mongoose schema for articles const articleSchema = new mongoose.Schema({ title: String, description: String, category: String, createdAt: Date, updatedAt: Date });
// Create Mongoose model const Article = mongoose.model('Article', articleSchema);
// Create Express app const app = express();
// Middlewares app.use(cors()); app.use(bodyParser.json());
// API routes for CRUD operations // ...
// Start the server app.listen(3000, () => console.log('Server started on port 3000'));