A progressive Node.js framework for building efficient and scalable server-side applications.
Nest framework TypeScript starter repository.
After cloning the repository, follow these steps to set up your Nest.js project:
- Navigate to the project directory:
cd <project_directory>
- Install the necessary dependencies:
npm install
- Run the development server:
npm run start:dev
Now, your Nest.js server should be running locally.
- Endpoint:
/books - Method:
GET - Description: Retrieves a list of all books.
- 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"
}
- Endpoint:
/books/:id - Method:
GET - Description: Retrieves a specific book by its ID.
- 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"
}