Giter Site home page Giter Site logo

officialozioma / bookly Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 56 KB

This is a RESTful API where users can search for books related to programming, IT or technology, from https://itbook.store. Registered users can also add books to their favourite list.

Dockerfile 0.50% JavaScript 99.50%
api itbooks nodejs restful-api

bookly's Introduction

Bookly-REST-API

Bookly This is a RESTful API where users can search for books related to programming, IT or technology, from https://itbook.store. Registered user can also add books to their favourite list.

Contents

Features

  • Users can create their profiles (token-based authentication)
  • Users can search for books by title, author or keywords
  • Users can view details of a particular book
  • Users can add books to their favorite list
  • Users can remove books from their favorite list
  • Users can view their list of favorite books

Tech used

Runtime environment

  • Node.js

API for books

Database

  • MongoDB

Containerized tool

  • Docker

How to get the project

Using Git (recommended)

  1. Navigate & open CLI into the directory where you want to put this project & Clone this project using this command.
git clone [email protected]:OfficialOzioma/bookly.git

Using manual download ZIP

  1. Download repository
  2. Extract the zip file, navigate into it & copy the folder to your desired directory

Setting up environments

  1. Inside the project folder
  2. You will find a file named .env.example
  3. Rename the file to .env & change the values of the variables in file, this include the MONGODB_URL and DB_NAME.
  4. You can also change the PORT variable to your desired port number
  5. Create a database in MongoDB & name it as you like.
  6. run npm install on the terminal to install all dependencies.
  7. start the server using npm run dev or npm start
  8. You can now access the API at http://localhost:3000

Run the project using docker

  1. To build docker image

    docker compose build --no-cache
  2. To run the containers in detached mode (wait for a while for database connection)

    docker compose up -d
  3. To view running containers

    docker container ps
  4. To view API logs

    docker logs booksearch-api-c
  5. To run tests, first enter within the API container

    • on windows CMD (not switching to bash)

      docker exec -it booksearch-api-c /bin/sh
    • on windows CMD (after switching to bash)

      docker exec -it booksearch-api-c //bin//sh

      or

      winpty docker exec -it booksearch-api-c //bin//sh

    now run test command

    npm test
  6. To exit from API container, press Ctrl+D on terminal

  7. To stop the containers

    docker compose down

API endpoints

Indication

  • Authentication required
  • Authentication not required

User related

Book related

License

Apache License

bookly's People

Contributors

officialozioma 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.