node --version npm install -g express-generator express --version cd desktop express Vidzy
cd Vidzy npm install npm install nodemon -g nodemon
npm install monk --save sudo npm install ejs --save npm install method-override --save
mongod // to start mongodb as a service mongod --dbpath ~/data/db // if your dbpath is different from /data/db
Steps for displaying movies on start/welcome page
- index.js: retrieve all documents from mongodb, pass them to ejs file
- index.ejs: display all videos
- create partials folder under views folder
- create header.ejs and footer.ejs under partials folder
- index.ejs: include header and footer ejs files
- include bootstrap in header.ejs
- Download the images and save them under public/images folder
- Add a new attribute (images) to movie documents in mongodb
- Show video list with images
- Add jumbotron
Next steps
- Video insert (/videos/new)
- Show video details (/videos/:id)
- Delete a video