Skip to content

Repository files navigation

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

Nest framework TypeScript starter repository.

Book API using Nest.js and Prisma

Project Setup

After cloning the repository, follow these steps to set up your Nest.js project:

  1. Navigate to the project directory:
cd <project_directory>

  1. Install the necessary dependencies:
npm install

  1. Run the development server:
npm run start:dev

Now, your Nest.js server should be running locally.

API Endpoints

Get All Books

  • Endpoint: /books
  • Method: GET
  • Description: Retrieves a list of all books.

Create a Book

  • Endpoint: /books
  • Method: POST
  • Description: Creates a new book.
  • Payload:
{
  "title": "To Kill a Mockingbird",
  "summary": "A novel about racial injustice and the loss of innocence in the American South.",
  "publishedDate": "2024-07-11T00:00:00Z"
}

Get Specific Book

  • Endpoint: /books/:id
  • Method: GET
  • Description: Retrieves a specific book by its ID.

Update Specific Book

  • Endpoint: /books/:id
  • Method: PUT
  • Description: Updates a specific book by its ID.
  • Payload:
{
  "title": "To Kill a Mockingbird",
  "summary": "A novel about racial injustice and the loss of innocence in the American South.",
  "publishedDate": "2024-07-11T00:00:00Z"
}

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages