- Node.js
- MongoDB
- GitBash
- Sample video for testing
- Install Node.js and npm
- Install Git and Git Bash
- 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
- Inside Git Bash navigate to project folder
- Run npm install
- 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
- Run node app.js
- Open browser on localhost:3000
- 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
Visit url:
/video/list