MyMusic is a simple web application that allows users to fetch and display song lyrics by entering the artist's name and the song title. It uses the Lyrics.ovh API to retrieve song lyrics.
- Search for song lyrics by artist and title.
- Displays lyrics in a clean and user-friendly interface.
- Fetches lyrics using the Lyrics.ovh API.
We use the Lyrics.ovh API to fetch song lyrics. It is a free API that provides lyrics for songs based on the artist name and song title.
GET https://api.lyrics.ovh/v1/artist/title
- artist: Name of the artist.
- title: Name of the song.
Example GET request for Postman
https://api.lyrics.ovh/v1/Coldplay/Viva La Vida
Prerequisites
Before you begin, ensure you have the following:
A web browser (Chrome, Firefox, etc.).
Git installed on your machine.
Clone the project
git clone https://github.com/TriptiMirani/MyMusic.git
Go to the project directory
cd MyMusic
The following packages are required for this project:
- axios: For making API requests
- body-parser: To parse incoming request bodies in a middleware
- ejs: Template engine for rendering HTML pages
- express: Framework for building the backend of the web app
- nodemon: Development tool to automatically restart the server on changes
npm i
Start the server
nodemon .\index.js
Enter the artist's name and the song title in the input fields.
Click the Submit button to fetch the lyrics.
The lyrics will be displayed below the search form.
If you search for:
Artist: Coldplay
Song Title: Viva La Vida
The application will display the lyrics for Coldplay's "Viva La Vida"
If you have any feedback, please reach out to me at Twitter/X