Web app that utilizes the Spotify API to display the user's Spotify profile data, such as top artists, top tracks, and recently played tracks. Allows the user to filter top artists and top tracks based on different time intervals, such as this month or all time.
-
Register a Spotify App in your Spotify Developer Dashboard and add
http://localhost:8888/callback
as a Redirect URI in the app settings. -
Create a
.env
file at the root of the project based on.env.example
and add your uniqueCLIENT_ID
from the Spotify dashboard. -
Install the correct version of Node
nvm install
-
Install dependencies
npm install
-
Run the React app on http://localhost:3000 and the Node server on http://localhost:8888
npm start
-
Create a Heroku app
-
Add your Heroku app as a git remote
heroku git:remote -a your-app-name
-
Add
http://your-app-name.herokuapp.com/callback
as a Redirect URL in your Spotify app's settings. -
In your app's Settings tab in the Heroku dashboard, add config vars.
Based on the values in your .env
file, the CLIENT_ID
, CLIENT_SECRET
, REDIRECT_URI
, and FRONTEND_URI
key value pairs. Make sure to replace the localhost
URLs with your heroku app's URL.
REDIRECT_URI: http://your-app-name.herokuapp.com/callback
FRONTEND_URI: http://your-app-name.herokuapp.com
-
Push to Heroku
git push heroku main