LRU Cache Demo is a NestJS server side application that fetches and caches GitHub user profiles using the LRU Cache library.
An instance of this repository has been deployed to lrucache.tk, please give it a visit! Please late a look at the endpoints below to start using the application.
- Checks the application health:
GET /
- Gets a GitHib profile and caches it:
GET /:username
- Removes a GitHib profile from the cache:
DELETE /:username
- Resets the cache instance:
POST /reset
- Re-instantiates the cache instance:
POST /re-instantiate
- Body:
{ capacity: <a positive integer>}
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov