https://github.com/luizcalaca/node-redis-cache-spotify-api
Node.js + Redis + Spotify API + Caching data
https://github.com/luizcalaca/node-redis-cache-spotify-api
docker docker-compose nodejs npm-package readme redis redis-cache spotify-api
Last synced: 3 months ago
JSON representation
Node.js + Redis + Spotify API + Caching data
- Host: GitHub
- URL: https://github.com/luizcalaca/node-redis-cache-spotify-api
- Owner: luizcalaca
- Created: 2022-12-23T21:00:06.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-23T21:00:12.000Z (over 3 years ago)
- Last Synced: 2026-01-03T16:29:30.701Z (6 months ago)
- Topics: docker, docker-compose, nodejs, npm-package, readme, redis, redis-cache, spotify-api
- Language: JavaScript
- Homepage:
- Size: 48.8 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Redis to cache Rock music from Spotify API
handling Rock music data with cache and make faster to access.
## Spotify API
- [DOC](https://developer.spotify.com/console/get-recommendations/)
## Technologies
- [Node.js](https://nodejs.org/en/)
- [Express](https://expressjs.com/)
- [Nodemon](https://nodemon.io/)
- [Docker](https://www.docker.com/docker-community)
- [Docker-Compose](https://docs.docker.com/compose/install/)
- [Redis](https://redis.io/)
- [Axios](https://github.com/axios/axios)
## Requirement
- [Docker](https://www.docker.com/docker-community)
- [Docker-Compose](https://docs.docker.com/compose/install/)
## Installation and Run
1. Create a `.env` file like `.env.example` with the credentials and informations;
2. Go to [Spotify API](https://developer.spotify.com/console/get-recommendations/) and get the token to SPOTIFY_TOKEN into .env
3. Run `docker run --name redis -p 6973:6973 redis` or just `docker-compose up`
4. `npm start`
## Routes
http://localhost:3000/spotify?maket=BR&seed_genres=rock
## Performance
1. Go to developer tools in browser, look at Network and see the Time in first request and how it decrease in second because the data are cached in memory with Redis.