Skip to content

Igor-Vuk/video_player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Video Player

Handle Video streaming from local computer##


Requirements

  • Node.js
  • MongoDB
  • GitBash
  • Sample video for testing

Setup

  1. Install Node.js and npm
  2. Install Git and Git Bash
  3. Install MongoDB
    • Default dbpath for MongoDB is c:\data\db
    • On C disk make a folder called data and inside of it folder called db
    • Open windows command prompt and navigate to bin folder (Example: C:\Program Files\MongoDB\Server\3.4\bin)
    • Run mongod.exe
    • If there is a message „waiting for connection on port 27017“ everything is OK and the server is running.
    • Leave this command prompt open and open Git Bash
  4. Inside Git Bash navigate to project folder
  5. Run npm install
  6. Run node test.js (This wil add movies from the uploads folder to the database)
    • to add movies see below - Adding new movies
    • to change the name of the database go to mongoClient.js and in url write the new name instead of myproject
  7. Run node app.js
  8. Open browser on localhost:3000

Adding new movies

  • All movies must be in uploads folder
  • Inside test.js file add movie information following already provided example
  • Run test.js
  • If adding a new movie later on, drop the database and run test.js again

Fetching the list of all videos in the database

Visit url:
/video/list


Examples

picture alt picture alt picture alt picture alt

Releases

No releases published

Packages

No packages published