Skip to content

An Express.js App used to cache requests to tubiblio and inject them with custom data

Notifications You must be signed in to change notification settings

nico-kunz/tubiblio-cached-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tubiblio Cached API

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.

Features

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

Getting Started

Prerequisites

Ensure you have the following installed:

Installation

  1. Clone the repository:

    git clone [email protected]:joynere/tubiblio-cached-api.git
    cd tubiblio-cached-api
  2. Install dependencies:

    yarn install
  3. Build the project:

    yarn build

Running the Application

In Production

To run the application in production mode:

yarn start

In Development

To run the application in development mode with automatic rebuilding and reloading:

yarn dev

Testing

To run the tests:

yarn test

Project Structure

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

Scripts

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

About

An Express.js App used to cache requests to tubiblio and inject them with custom data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published