The BrainFlix React app renders a featured video from a list of videos using urls from an external website. The associated details and comments for the featured video are also rendered.
In addition, a new video with its data can be added to the list. The video data is accessed via an api call to the backend Express server.
The Express server includes routes to get all of the videos from the list, the hero video using a specific video id, and a post request which allows users to add new videos to the list.
Data is persistently stored in a JSON file. CORS requirements are handled with middleware. The app is currently locally deployed.
- Ensure you have the dependencies installed.
- Navigate to the frontend root directory in terminal.
- Install the node modules in the frontend.
npm install
- Start the server.
npm run start
- Navigate to http://localhost:3000 in your browser.
- Navigate to the root directory of the backend in terminal.
- Install the node modules in the backend.
npm install
- Start the server using the terminal.
node index.js
- Navigate to http://localhost:8080 in your browser.