To run this project locally, ensure you have the following software installed on your machine:
- Node.js: Version 14 or higher
- npm: Version 6 or higher (comes with Node.js)
- Vite: Vite is a build tool that provides a faster and leaner development experience for modern web projects.
Before running the project, you need to install the necessary packages. These packages are defined in the package.json
file. You can install them using npm by running the following command in your terminal:
npm install
Once you have all the dependencies installed, you can start the development server using Vite. Run the following command:
npm run dev
This command will start the Vite development server. By default, the project will be available at http://localhost:3000
. You can open this URL in your browser to view the application.
To use the YouTube to MP3 conversion functionality, you'll need to obtain an API key from RapidAPI. Follow these three simple steps to create your API key:
Go to RapidAPI's website and sign up for a free account if you don't have one. If you already have an account, log in.
Search for the YouTube MP3 by ytjar API in the RapidAPI marketplace. Once you've found it, click on it to view its details.
Subscribe to the API by selecting the free or paid plan that suits your needs.
- After subscribing, navigate to the "Apps" tab of the API.
- Select "default application" on the sidebar and click Authorization.
- Here, you will find your API key in the "X-RapidAPI-Key" field. Copy this key, as you will need to add it to your project.
Once you have your API key, you'll need to set it up in your project:
- Create a
.env
file in the root of your project directory. - Add the following line to your
.env
file, replacingYOUR_API_KEY
with the actual key you copied:
VITE_RAPID_API_KEY=YOUR_API_KEY
- Save the
.env
file. Your project is now configured to use the RapidAPI service.