Skip to content

This is a book-store app created using NestJS, which is a progressive Node.js framework for building efficient and scalable server-side applications.

Notifications You must be signed in to change notification settings

nil2022/my-nestjs-app

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

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.

Prerequisites

  • Node.js (v14 or later)
  • PostgreSQL

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

APIs

GET Endpoint

Endpoint:
GET http://localhost:3000/book/api/v1/getbooks
Description:

Retrieves all data from the PostgreSQL database.

Usage:

Make a GET request to the /your-endpoint endpoint to fetch all data.

POST Endpoint

Endpoint:
POST http://localhost:3000/book/api/v1/addbook
Description:

Adds a new book to the PostgreSQL database.

Usage:

Make a POST request to the /your-endpoint endpoint to add a new book.

Example:

Request:
{
  "title": "The Great Gatsby",
  "author": "F. Scott Fitzgerald",
  "published": "2010"
}
Response:
{
  "id": 1,
  "title": "The Great Gatsby",
  "author": "F. Scott Fitzgerald",
  "published": "2010"
}

Dependencies

Stay in touch

About

This is a book-store app created using NestJS, which is a progressive Node.js framework for building efficient and scalable server-side applications.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published