A web API for a Spotify clone built with Node.js and the Spotify Web API Node wrapper.
Spotify backend clone built on top of Node.js and the spotify-web-api-node wrapper. The main goal of this project is to provide a backend for a music streaming service that allows users to search for and play songs, as well as save their favorite tracks and playlists.
- Clone the repository.
- Run
npm install
to install dependencies. - Create a
.env
file in the root directory and add your Spotify API credentials: - Start using!
SPOTIFY_CLIENT_ID=your_client_id SPOTIFY_CLIENT_SECRET=your_client_secret
To use the Spotify Web API, you need to register your application with Spotify and obtain API credentials, which consist of a client ID and client secret. Here are the steps:
- Log in to the Spotify Developer Dashboard using your Spotify account.
- Click the "Create an App" button and fill in the required information, such as the app name, description, and website.
- Once you've created the app, you will be redirected to its dashboard. Here you will find your client ID and client secret under the "Client ID" and "Client Secret" sections, respectively.
- Copy your client ID and client secret and use them in your Node.js application as environment variables (e.g. in a .env file).
Start the server with npm start
. The server will run on port 3000 by default.
API routes:
GET /search
: Search for tracks, albums, or artists.GET /tracks/:id
: Get detailed information about a track by its Spotify ID.GET /albums/:id
: Get detailed information about an album by its Spotify ID.GET /artists/:id
: Get detailed information about an artist by their Spotify ID.
All the songs along with their lyrics can be searched using the search bar on top of the page
Contributions are welcome! Please open a pull request with your changes.