Skip to content

arman-develops/BookStoreAPINodeJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BookStoreAPI

BookStoreAPI is a Node.js backend service that allows users to perform CRUD (Create, Read, Update, Delete) operations on books and authors. The application connects to a MongoDB database and provides a REST API to manage a bookstore's catalog and author details.

Features

  • Add Books: Add new books with title, author, genre, and description.
  • List Books: Fetch a list of all available books in the store.
  • Update Books: Update information about existing books.
  • Delete Books: Remove books from the catalog.
  • Add Authors: Manage authors' information including names and ID associations.
  • Delete Authors: Remove author information from the database.
  • Database Abstraction Layer: Developed a single interface for my database controllers but each database implementation is different.
  • MongoDB Integration: Uses MongoDB Atlas for storing books and authors.
  • PostgreSQL Integration: Uses PostgreSQL as an optional database
  • GraphQL API Integration: Coming soon.

Table of Contents

Installation

  1. Clone the repository:
    git clone https://github.com/arman-develops/BookStoreAPINodeJS.git
    
  2. Navigate into the project directory
    cd BookStoreAPINodejs
  3. Install dependencies
    npm install
    
  4. Create a .env file in the root directory of the project and set the following environment variables
    SERVER_PORT=3000
    
    MONGODB_URL=mongodb+srv://<username>:<password>@cluster0.mongodb.net/BookStoreAPI?retryWrites=true&w=majority&appName=Cluster0
    
    DB_TYPE=mongodb
    
    
  5. start the development server
    npm run dev
    
    

Usage

Once the server is up, the API is accessible at http://localhost:3000 At tool like Postman or curl comes in handy.

Techonologies

1.Node.JS: Javascript runtime for building backend

2.ExpressJS: web framework for node.js used to create the backend.

3.MongoDB: NoSQL database used to store data.

4.Mongoose: MongoDB object modelling tool for schema and query management.

5.MongoDB Atlas: Cloud-hosted MongoDB database.

6.PostgreSQL Database: Locally and cloud hosted installations.

7.GraphQL API: Coming soon.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published