This README provides an overview of Task 2 of the CodeClause internship project. In this task, we have created a blog management website using RESTful API, JavaScript, HTML, CSS, Express.js, and EJS templating. Additionally, we have incorporated method overriding using an npm package due to the absence of PATCH and DELETE request support in HTML forms.
Task 2 of the CodeClause internship project involves the development of a blog management website. The website allows users to create, read, update, and delete blog posts. It utilizes a RESTful API architecture for communication between the client and server.
The following technologies and tools were used in the project:
- JavaScript
- HTML
- CSS
- Express.js
- EJS (Embedded JavaScript) Templating
- Method Overriding Package (npm)
REST (Representational State Transfer) is an architectural style for designing networked applications. In our project, we have implemented a RESTful API to perform CRUD (Create, Read, Update, Delete) operations on blog posts. Here is an overview of the supported API endpoints:
GET /posts
: Retrieve a list of all blog posts.GET /posts/:id
: Retrieve a specific blog post by its ID.POST /posts
: Create a new blog post.PUT /posts/:id
: Update an existing blog post by its ID.DELETE /posts/:id
: Delete a blog post by its ID.
To run the blog management website locally, follow these steps:
- Clone the repository:
git clone https://github.com/thepravin/Daily-Blog-Website.git
- Navigate to the project directory:
cd Daily-Blog-Website
- Install dependencies:
npm install
- Start the server:
npm start
Once the server is running, you can access the blog management website by opening a web browser and visiting http://localhost:8080/posts
. You can perform CRUD operations on blog posts through the user-friendly interface.
We welcome contributions to this project. If you would like to contribute, please fork the repository, make your changes, and submit a pull request.