Approach to Create a News Media Platform
- List all the requirement for the project and make the structure of the project accordingly.
- Chooses the required dependencies and requirement which are more suitable for the project.
For Backend:
- Create a directory named model inside root directory.
- Create a javascript file named articleSchema.js in the model directory for collection news schema.
- Then create another route directory inside root(Backend folder).
- Create another javascript file named articleRoute.js to handle API request.
For Frontend:
- Create a components directory inside root directory(Frontend folder).
- Create three file of javascript inside components folder namely DeleteArticle.jsx, NewsArticleForm.jsx and NewsList.jsx which are used to delete, add new article and show a list of news respectively.
News Media Platform with MERN Stack
In this article, we’ll walk through the step-by-step process of creating a News Media Platform using the MERN (MongoDB, ExpressJS, React, NodeJS) stack. This project will showcase how to set up a full-stack web application where users can view a news article, add a new news article, and delete one.
Preview of final output: Let us have a look at how the final application will look like.