Skip to content

sushantr134/spotify-music

Repository files navigation

spotify-music

A small app based on Spotify API

Screenshot-95

Steps to run this App on your local machine

1.) Need to add .env file at the root level and then add the following env variables :-

  • CLIENT_ID_SPOTIFY = {'YOUR CLIENT ID'}
  • CLIENT_SECRET_SPOTIFY = {'YOUR CLIENT SECRET'}
  • REDIRECT_URI = http://localhost:8888/callback/ // this url must be configured with spotify dashboard
  • REACT_DEV_APP_URL = http://localhost:4000 //development mode url
  • REACT_PROD_APP_URL = http://localhost:8000 //production mode url
  • SERVER_URL = http://localhost:8888 //auth-server url for spotify login
  • MODE = development // When you are running the app in dev mode otherwise it must be production
2.) `yarn dev` to run app in development mode.
3.) `yarn build` to build the app in production-mode.
4.) `yarn start-server` to run auth-server for spotify login.

use `yarn start-sever` ( no need to close terminal tab when auth-server is running) and then run `yarn dev` or `yarn build` in another terminal window.
server.js file is to serve the app from final production build directory for that you need to change the .env variable `MODE` to `production` from `development` and then run `yarn start-server` followed by `yarn run-app`.