This project uses the Spotify Web API to allow users to search for music within Spotify's music library. The project contains a React frontend that provides users with the ability to sign in to the application using OAuth, providing access to their Spotify account. Upon signing in, users will then be able to search for music by Artist, Album, Track Name, etc. All search and OAuth requests are handled by an Express backend API which acts as a middleman between the application frontend and Spotify's web APIs.
The following programming languages, package managers, services & web browsers are required to run the application.
To get the project up and running make sure that you have all of the required prerequisites listed in the previous section installed on your system. Then follow the steps below:
.env.dist
file and rename it to .env
& update the environment variables to your desired settings.npm install
to install all dependencies.npm start
or npm run dev
to start the Express backend server & React frontend.Important Note: In production, the React build is served statically by the backend API so the backend API must be running in order to view the React frontend in the browser.
Production:
npm start
= Start the production Express backend & React frontend.npm run start:api
= Start the production Express backend only.npm run start:react
= Build the production React frontend only.Development:
npm run dev
= Start the development Express backend & React frontend.npm run dev:api
= Start the development Express backend only.npm run dev:react
= Start the development React frontend only.npm run lint:react
= Lint the React frontend using eslint.http://localhost:3000/
http://localhost:3000/spotify/v1/login
http://localhost:3000/spotify/v1/callback
http://localhost:3000/spotify/v1/search