Skip to content

tiagomsg/library-api

Repository files navigation

AND Library REST API

REST API built in NodeJS with Express framework. Pet project for introduction to Node and its ecosystem.

Install

  1. Clone repo
  2. yarn install

Run

Development

yarn start

Unit Tests

  • yarn test - runs all tests
  • yarn test-watch - runs all tests in watch mode
  • jest src/app/models - runs all tests under models

Integration Tests

  1. Start mongo DB instance docker run -p 27017:27017 mongo
  2. Run tests jest test/integration/

Libraries

  • Yarn - For package management and execution
  • Winston - For logging
  • Dotenv - For environment variables support
  • Mockingoose - Mocking Mongoose Models

Battles

  • Mongoose connections were left open when running integration tests which would leave Jest hanging. Add to explicitly close the mongoose connection (and force it!). jestjs/jest#3602

About

Simple library API to track books and loans.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published