Giter VIP home page Giter VIP logo

bookstore's Introduction

The BookStore

Plenty of tech books.

Requirements

  • docker
  • docker compose that supports version '2.4'

How to run locally

To start the project locally, run:

docker-compose up --build

And you should see something like:

api_1      | 
api_1      | > [email protected] start
api_1      | > node app.js
api_1      | 
api_1      | (node:19) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
api_1      | (Use `node --trace-deprecation ...` to show where the warning was created)

This log will take some time to appear because the database is bootstraping and the script is populating the database with some mock data. In other words, only start accessing/testing the app once you see the output as shown above.

Then, to access the bookstore on the browser, type localhost:3000.

Endpoints

There are two HTTP GET method endpoints available:

  • GET /. Gets all books. To retrieve books only in certain category, you can use optional query parameter category. For example, to get all books in category "Java", the request will look like GET /?category=Java.

  • GET /search?q={title}. Searches books by title. For example, to get all books that contain "Java" in their title, the request will look like GET /search?q=Java.

Resource usage stats

To see how many resources the application "eats", type docker stats after running locally. Make sure the app is running in parallel, otherwise there would be no output.

Credits

Created and being maintained by Batyr Nuryyev, for CMPUT 402 "Software Quality" class (Winter 2021).

Books data obtain from dudeonthehorse's repository.

bookstore's People

Contributors

oneturkmen avatar hazelybell avatar kaelenb 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.