A progressive Node.js framework for building efficient and scalable server-side applications.
This is a Book Store App build using Nest. This repository demonstrates the implementation of GET and POST APIs using NestJS and PostgreSQL with TypeORM.
- Node.js (v14 or later)
- PostgreSQL
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
GET http://localhost:3000/book/api/v1/getbooks
Retrieves all data from the PostgreSQL database.
Make a GET request to the /your-endpoint endpoint to fetch all data.
POST http://localhost:3000/book/api/v1/addbook
Adds a new book to the PostgreSQL database.
Make a POST request to the /your-endpoint endpoint to add a new book.
Example:
{
"title": "The Great Gatsby",
"author": "F. Scott Fitzgerald",
"published": "2010"
}
{
"id": 1,
"title": "The Great Gatsby",
"author": "F. Scott Fitzgerald",
"published": "2010"
}
- Website - https://nestjs.com