This repository contains an Express.js application designed to cache requests to the Tubiblio API and inject custom data into the responses. Tubiblio often experiences high downtime or slow response times, so this app helps to mitigate those issues by storing the data locally as JSON files.
- Caching: Requests to the Tubiblio API are cached as JSON files, reducing the need to frequently query the Tubiblio service.
- Custom Data Injection: Allows for custom data to be injected into the cached responses.
- Fast Response Times: With the caching mechanism in place, responses are quicker and more reliable, even when Tubiblio is down or slow.
Ensure you have the following installed:
-
Clone the repository:
git clone [email protected]:joynere/tubiblio-cached-api.git cd tubiblio-cached-api
-
Install dependencies:
yarn install
-
Build the project:
yarn build
To run the application in production mode:
yarn start
To run the application in development mode with automatic rebuilding and reloading:
yarn dev
To run the tests:
yarn test
src/
: Contains the source code for the application.dist/
: Contains the compiled JavaScript files after building the project.test/
: Contains mocha test files for the application.
build
: Compiles TypeScript files to JavaScript.start
: Runs the compiled application.dev
: Runs the application in development mode with live reloading.test
: Runs tests after compiling the TypeScript files.