Preview:
This project was born out of the desire to delve into the realms of Express and MySQL, aiming to master the art of backend development and database management.
Express, a robust Node.js framework, empowers us to effortlessly build APIs and handle server-side logic. Meanwhile, MySQL, a reliable relational database management system, serves as our storage solution for blog posts, providing structured data management.
-
User-friendly Interface: The blog website is designed using React and styled-components to provide a visually appealing and intuitive user experience.
-
Responsive Design: The website is built with a responsive design, ensuring a seamless experience across various devices.
-
Typescript: The use of Typescript enhances code quality, providing static typing for a more robust codebase.
-
Express Backend: NodeJs with Express is used as the backend server, handling API requests and serving data to the front end.
-
MySQL Database: The blog posts are stored in a MySQL database, providing a reliable and scalable solution for data storage.
-
Dynamic Content: The blog fetches and displays posts dynamically from the MySQL database.
-
Front-end: React, Typescript, styled components, Next Js
-
Back-end: Node, Express
-
SGDB: MySQL
• Clone this repo
• Go to the project folder
• Install dependencies
-
Database Setup:
- Create a MySQL database.
- Update the database configuration in
server/connection.js
.
-
Environment Variables:
- Create a
.env
file in the root of the project. - Add the following environment variables: DB_PASSWORD, DB_USER, DB_PORT, DB_HOST, DB_DATABASE
- Create a
- Start the backend server:
npm run dev
- Start the frontend application:
npm run dev
- Open your browser and navigate to
http://localhost:3000