This repository contains a case study for a Library Management system. It provides the schema setup, database configuration, and dummy data necessary for the management of books, users, and borrowings in a library system.
The case study involves setting up a PostgreSQL database and running scripts to create the required tables and indices, followed by inserting dummy data for testing purposes.
All relevant documentation for this project can be found in the doc folder. The documents in this folder provide detailed information about the project setup and other relevant details.
To set up the database, follow the instructions in the documentation located under doc/postgresql/setup-database.md. This will guide you through the process of setting up PostgreSQL, creating the database, and running the necessary setup scripts.
To install the packages, please you can run the following command:
$ npm install
This will load all the dependencies specified in the package.json file.
To start the server, run:
$ npm start
If you'd like to watch for changes and automatically restart the server when changes are made, you can use the following command:
$ npm run serve
This will enable automatic server restarts during development.
To run the Postman tests, use the following command:
$ npm run postman-tests
Please ensure that the server is running before executing the Postman tests, as the tests require the server to be active in order to interact with the endpoints.
To run the unit tests for the project, execute:
$ npm run test
This will run the unit tests and display the results in the terminal. Due to time constraints, only some unit tests have been written.