Build a Mini Netflix (with React)
  • About Cloudinary Labs
  • Build a Mini Netflix with Cloudinary
    • Introduction
    • Delivering Video
    • Setup React
    • Install Dependencies
    • Styling your App
    • User Authentication
    • Callback Component
    • Navigation Component
    • Display Component
    • Setup Root Route
    • Upload Component
    • Setup Upload Route
    • Upload Videos
    • Display Videos
    • Enable Auth
    • Share on Twitter
Powered by GitBook
On this page
  • Import Upload component
  • Set up the Upload route
  • Run your app
  1. Build a Mini Netflix with Cloudinary

Setup Upload Route

In order to see how your app works, you need to set up the upload route.

Open up your src/index.js where the routes exist.

Import Upload component

Import the recently created Upload component.

...
import Upload from './components/Upload';
...

Set up the Upload route

Add the /upload route.

<Route path="/upload" component={Upload} />

Your routes should look like the code below.

...
...
const Root = () => {
  return (
    <div className="container">
      <Router history={browserHistory}>
        <Route path="/" component={Display}/>
        <Route path="/upload" component={Upload} />
      </Router>
    </div>
  )
}

Run your app

Your app should live-reload. In your browser, enter the upload route, http://localhost:3000/upload.

Your app should look like this now.

PreviousUpload ComponentNextUpload Videos

Last updated 7 years ago

App with upload route