Skip to content

apivideo/youtube-clone-next

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

api.video Logo

Rebuilding YouTube with api.video + Next.js 🔥

Twitter Badge Pull Requests Badge

An open-source example application that allows users to list videos in the youtube style using api.video

View Demo

Table of Contents

  1. About The Project
  2. Getting Started

About The Project

api.video:

  • @api.video/nodejs-client. - api.video's Node.js is a lightweight client built in TypeScript that streamlines the coding process. Chunking files is handled for you, as is pagination and refreshing your tokens.

NextJS:

  • /pages/api routes — a couple endpoints for making requests to the api.video API.
  • Dynamic routes to display a specific video.
  • Usage of React API Context to store a new ApiKey

Getting Started

Step 1. Clone

First we need to clone the project

git clone git@github.com:apivideo/youtube-clone-next.git
cd youtube-clone-next

# run the development server
npm run dev
# or
yarn dev

Step 2. Create an account

All you need to set this up is a api.video account. You can sign up for free. You can use our services in sandbox environment but the videos you upload will last 24 hours.

Once you signed up, you will have a sandbox API Key available on the home page.

Step 3. Set Up Environment Variables

In order to see your videos by default, all you have to do is to use your API Key. You need to create a environment variable at the root of the project.

touch .env.development

Then edit the file like API_KEY should be your API_KEY available on the dashboard

API_KEY = XXXXXXXXXXXXXXXXXXXXXXXXXXX;