Lodyr is an app that convert YouTube videos to MP3 format using dedicated API and returns link for the converted file download.
This project is an example full-stack project that demonstrates usage of node and express.js possibilities AND also my attempt to create my own YT to mp3 converter for personal usage without any annoying ads and simple interface. The app logic is simple as that:
-
User input link for preferred video to be converted to .mp3 format(video must not exceed 10min. length)
-
After pressing 'Convert' button the app:
- Trims YT link to extract video ID.
- Makes API request to convert video form ID extracted.
- Returns download link to new .mp3 file OR displays according error if something went wrong.
To use Lodyr you need to have NodeJS and npm installed on your computer (https://nodejs.org/en/download). After that:
-
Clone this project.
-
Install all needed dependencies. Go to the folder where you've cloned this project and execute
npm installcommand in your terminal or cmd. -
Get API keys to use the converting feature of app . Go to https://rapidapi.com/ytjar/api/youtube-mp36/ and sign in.
-
Look to the right side of your screen where you will see
Code Snippetstab. There you need to copy two values fromheadersobject:X-RapidAPI-KeyandX-RapidApi-Host. -
Go to the root folder of lodyr and create
.envfile.- Inside the
.envfile write two lines of codeAPI_KEY=andAPI_HOST=(new line each). - After
=ofAPI_KEYline paste your copiedX-RapidAPI-Keyvalue. - After
=ofAPI_HOSTline paste your copiedX-RapidAPI-Hostvalue. - Save and close the file.
- Inside the
-
Start the project. Type
npm run devin your cmd or terminal window and hit enter. -
The app is running on your http://localhost:3500 port now.
-
Paste the link of YouTube video you want to convert to .mp3 and press 'Convert' button.