An open API service indexing awesome lists of open source software.

https://github.com/apivideo/youtube-clone-next

Rebuilding YouTube with api.video and Next.js 🎥
https://github.com/apivideo/youtube-clone-next

nextjs nodejs tutorial video video-player

Last synced: 9 months ago
JSON representation

Rebuilding YouTube with api.video and Next.js 🎥

Awesome Lists containing this project

README

          


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.](https://github.com/apivideo/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`](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](https://fr.reactjs.org/docs/context.html) to store a new ApiKey

# Getting Started

## Step 1. Clone

First we need to clone the project

```bash
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](https://dashboard.api.video). 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.

```bash
touch .env.development
```

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

```javascript
API_KEY = XXXXXXXXXXXXXXXXXXXXXXXXXXX;
```