Welcome to the Blog Node.js with EJS project! This is a simple blogging application built using Node.js and EJS (Embedded JavaScript templates). This project allows you to create, view, edit, and delete blog posts. It serves as a basic template for a blog website with a backend written in Node.js and a frontend powered by EJS templates.
To get started with the project, follow these steps:
- Make sure you have Node.js installed on your machine. If not, you can download it from nodejs.org.
1.Clone the repository:
git clone https://github.com/amrmabdelazeem/blog-nodejs-ejs.git
- Change into the project directory:
cd blog-nodejs-ejs
- Install the dependencies:
npm install
- Start the application:
node index.js
- Open your web browser and navigate to http://localhost:3000 to access the blog application.
- Create a new post: Add new blog posts with a title and content.
- View posts: Browse through the existing blog posts on the home page.
- Edit posts: Click on the "Edit" button to modify the content of a blog post.
- Delete posts: Remove unwanted posts by clicking on the "Delete" button.
- index.js: The main entry point of the application.
- views/: Contains the EJS templates for rendering the HTML pages.
- public/: Includes static assets such as stylesheets and images.
- routes/: Defines the routes and controllers for handling different actions.
- partials/: For EJS header and footer templates.
- Express: A minimal and flexible Node.js web application framework.
- EJS: Embedded JavaScript templates for rendering dynamic content.
- Body-parser: Middleware for parsing incoming request bodies.
Special thanks to the original author, amrmabdelazeem , for creating this project.
Happy blogging! 🚀