Skip to content

Implementation of the SpotifyWebPlayer JS SDK using React.js and Express.js

Notifications You must be signed in to change notification settings

riverray121/SpotifyReactExpresssPlayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spotify WebPlayer SDK using Express and React JS

Description

A Spotify WebPlayer built on Node.js with an Express.js server and React.js client. Built for usage within a WKWebView in the MultiPlaylists App.

Prepared for Heroku deployment if desired: see "heroku-postbuild" in package.json of root directorty.

Usage

Run Locally

  1. Clone this repository and 'cd' into it
  2. Create an app on the Spotify Developer website
  3. Add http://localhost:5000/auth/callback to your redirect URI's of your new Spotify App (Dashbord->Your App->Edit Settings)
  4. Copy your Client ID and Client Secret to the '.env' file in the root directory
  5. Ensure you have 'nvm' installed and 'node LTS v16.x' installed
  6. Run 'nvm use 16'
  7. Create the react build:
    • 'cd' into 'client' directory
    • run 'npm install'
    • run 'npm run build'
    • 'cd' back to root directory
  8. From the project root directory run 'npm install'
  9. Run 'npm start'
  10. Open http://localhost:5000

Note for MacOS Users

If you are using a modern Mac you must turn off AirPlay reciever which normally runs on the 5000 port: System Settings -> General -> AirDrop and Handoff -> AirPlay reciever

Resources

Built based on Spotify Tutorial with modifications to simplify the proxy.

Infromation on deployment to Heroku.

About

Implementation of the SpotifyWebPlayer JS SDK using React.js and Express.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published