Coder Social home page Coder Social logo

crudlib's Introduction

๐Ÿ“— Table of Contents

Bookstore API

Bookstore API is a backend service used to perform CRUD operation with books. It is built with NodeJS and uses MongoDB as the database.

๐Ÿ›  Built With

Tech Stack

Server
Database

Key Features

  • API Endpoints to perform CRUD operations
  • Database deployment on Mongo Atlas

(back to top)

๐Ÿ’ป Getting Started

To get a local copy up and running, follow these steps.

Prerequisites

Setup

Clone this repository to your desired folder:

  git clone https://github.com/mailsg/crudlib.git
  cd crudlib  

Install

Install this project by executing the following commands. Since its an Open API, there is no need to set up any API keys:

  cd crudlib

  npm install

  touch .env
    `Add the following lines to the .env file`
      MONGODB_URI=`Your MongoDB-Atlas URI (mongodb+srv)`
      DATABASE_NAME=`Your MongoDB Database Name`
      COLLECTION_NAME=`Your MongoDB Collection Name`

  - Please note that the above 3 variables are mandatory for the project to run.

  - I have used Database Name as `library` and Collection Name as `books` for this project. You can use any name of your choice or use the same as mine.
  
  - The database and collection has to be created manually in MongoDB Atlas.

Usage

To run the project, execute the following command:

  npm start

Below are the Endpoints to perform CRUD operations:

  • GET http://localhost:3000/api/books - Get all books
  • GET http://localhost:3000/api/books/:id - Get a book by id
  • POST http://localhost:3000/api/books - Create a new book
    • Request Body
      {
        "title": "Book Title",
        "author": "Book Author",
        "summary": "Book Summary"
      }
  • PUT http://localhost:3000/api/books/:id - Update a book by id
    • Request Body (Any or all of the following)
      {
        "title": "Book Title", 
        "author": "Book Author",
        "summary": "Book Summary"
      }
  • DELETE http://localhost:3000/api/books/:id - Delete a book by id

๐Ÿ‘ค Sandeep Ghosh

(back to top)

๐Ÿค Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

(back to top)

โญ๏ธ Show your support

If you like this project consider leaving a star to the repository.

(back to top)

๐Ÿ™ Acknowledgments

Thank you for giving me the opportunity to showcase my skills.

(back to top)

๐Ÿ“ License

This project is MIT licensed.

(back to top)

crudlib's People

Contributors

mailsg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.