Skip to content

Latest commit

 

History

History
40 lines (37 loc) · 2.38 KB

README.md

File metadata and controls

40 lines (37 loc) · 2.38 KB

Node.js Backend Spotify Clone

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.


Getting Started

  1. Clone the repository.
  2. Run npm install to install dependencies.
  3. Create a .env file in the root directory and add your Spotify API credentials:
  4. Start using!
    SPOTIFY_CLIENT_ID=your_client_id
    SPOTIFY_CLIENT_SECRET=your_client_secret
  

Obtaining a Client ID and 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:

  1. Log in to the Spotify Developer Dashboard using your Spotify account.
  2. Click the "Create an App" button and fill in the required information, such as the app name, description, and website.
  3. 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.
  4. Copy your client ID and client secret and use them in your Node.js application as environment variables (e.g. in a .env file).

Usage

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

Contributing

Contributions are welcome! Please open a pull request with your changes.