Skip to content

A NestJS API for a generic CMS used for managing blog posts.

Notifications You must be signed in to change notification settings

srijan-nayak/cms-backend

Repository files navigation

CMS Backend

Running the project locally

Clone and install dependencies

git clone https://github.com/srijan-nayak/cms-backend.git
cd cms-backend
npm install

Configure connection string

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

Run the server

npm start

The server will be listening on localhost:3300.

API Routes

  • GET /posts: List of all posts
  • GET /posts/:id: Get specific post by post ID
  • POST /posts Create new post
  • PUT /posts/:id Edit a specific post
  • DELETE /posts/:id Delete a specific post

Body schema for posts POST and PUT routes

{
  "title": "string",
  "author": "string",
  "image": "string",
  "content": "string"
}

About

A NestJS API for a generic CMS used for managing blog posts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published