Giter Club home page Giter Club logo

libraryservice's Introduction

LibraryService

This microservice provides features related to books in a library. This service is written in Typescript and uses the NestJs application framework. Package management is done with Node.js. Data storage is in MySQL, with Prisma providing ORM features. The unit tests use Jest.

Getting Started

This service can be run locally with a standalone MySQL installation. A script is provided to handle creating the database schema, before starting the service. Create '.env' to configure your local installation.

  • npm run startup

After the initial startup and schema deployment, the service can be started with

  • npm run start

Alternately, the service can be run in a Docker container alongside a containerized MySQL instance. With Docker installed and the engine started, use:

  • docker compose up

This will pull images with Node, install dependencies, build and copy relevant files, deploy the DB schema and start the service.

Service will be available on localhost, port 3000 via either method.

Testing

The Library controller and service are covered by unit tests. The tests use mocking to isolate the code under test as appropriate. Tests can be executed with:

  • npm run test

Postman is a popular API testing tool, and a sample endpoint collection is provided in "Library.postman_collection.json" for convenience.

Swagger API Documentation

The API docs are available in swagger.json or live in the running application at http://localhost:3000/api The live version also supports running sample requests to the service.

AI Integration

This service integrates with OpenAI's ChatGPT functionality to provide generated responses recommending new content given the description of existing content. Provide your API key to use this funcitonality.

libraryservice's People

Contributors

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