git clone https://github.com/srijan-nayak/cms-backend.git
cd cms-backend
npm install
Using the .env.example
file as a reference, create a .env
file and replace
the value for MONGODB_URI
environment variable with the connection string to
your MongoDB database.
cp .env.example .env
# edit .env file and replace the value for the MONGODB_URI variable
npm start
The server will be listening on localhost:3300.
GET /posts
: List of all postsGET /posts/:id
: Get specific post by post IDPOST /posts
Create new postPUT /posts/:id
Edit a specific postDELETE /posts/:id
Delete a specific post
{
"title": "string",
"author": "string",
"image": "string",
"content": "string"
}