This project is a simple web application that retrieves the details of a Spotify track, including the track name and artist name, from a Spotify URL. It also provides links to search for the track and artist on Google and YouTube.
- Fetch Spotify track details using Spotify's Web API.
- Display track name and artist name.
- Provide links to search for the track and artist on Google and YouTube.
- Node.js
- npm (Node Package Manager)
-
Clone the repository:
git clone https://github.com/yourusername/spotify-track-details.git cd spotify-track-details
-
Install the dependencies:
npm install
-
Create a
.env
file in the root directory and add your Spotify API credentials:CLIENT_ID=your_client_id_here CLIENT_SECRET=your_client_secret_here
To run the application in development mode with auto-reload:
npm run dev
To run the application in production mode:
npm start
The server will start on http://localhost:3000
.
- Login to your Vercel account.
- Import the project from your Git repository.
- In your Vercel project settings, add the following environment variables:
CLIENT_ID
CLIENT_SECRET
- Deploy the project.
- Open your browser and go to
http://localhost:3000
. - Enter a Spotify track URL in the input field and click "Get Track Details".
- The track name and artist name will be displayed along with links to search for the track and artist on Google and YouTube.
spotify-track-details/
│
├── public/
│ ├── index.html
│ ├── script.js
│ └── styles.css
│
├── server.js
├── .env
├── .gitignore
├── package.json
└── README.md
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request for any changes.
- Express - Fast, unopinionated, minimalist web framework for Node.js
- Node Fetch - A light-weight module that brings
window.fetch
to Node.js