![]() |
VOOZH | about |
This project is a Content Management System (CMS) Admin Panel developed using React for the frontend and NodeJS and ExpressJS for the backend. The Admin Panel allows administrators to manage content, including viewing and editing posts, approving pending posts, and adding new content. It features real-time updates, allowing administrators to collaboratively manage content seamlessly.
Output Preview: Let us have a look at how the final output will look like.
👁 Screenshot-2024-03-04-155725
body-parser middleware to parse request bodies.axios for making HTTP requests to the server.useState hooks to manage the state of posts, new content, and content being edited.useEffect hook to fetch content from the server when the component mounts.Step 1: Create a new project directory and navigate to your project directory.
mkdir <<name of project>>
cd <<name of project>>
Step 2: Run the following command to initialize a new NodeJS project.
npm init -yStep 2: Install the required the packages in your server using the following command.
npm install express body-parser corsThe updated dependencies in package.json file of backend will look like:
"dependencies": {
"express": "^4.18.2",
"cors": "^2.8.5",
"body-parser": "^1.20.2"
}
Example: Below is an example of creating a server of content management system.
Start the server using the following command.
node index.jsThis will run your server on http://localhost:5000/cms. You should see the message "Server is running on port 5000" in the terminal.
Step 1: Create a new application using the following command.
npx create-react-app <<Name_of_project>>
cd <<Name_of_project>>
Step 2: Install the required packages in your application using the following command.
npm intall axiosThe updated dependencies in package.json file of frontend will look like:
"dependencies": {
"axios": "^1.6.7",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"web-vitals": "^2.1.4"
}
Example: Below is an example of creating frontend for content management system.
Step 4: Start the React App
npm startOutput: