Tonight you need to use Node.js to make a request to OMDB.
- Fork and clone this repo.
npm installto installrequest- Define
movie.jsand anapp.js.
- The movie file will contain a Module.
- This module should export a function named
get(movieTitle). get(movieTitle)should make a request to OMDB with the movieTitle as an argument.- You should console.log your output.
- You should test this with
nodeto verify it works!
- The app should require your movie module.
- You should define your
threeFavoriteMoviesas an array. - You should then use the
Array.forEach()function to loop through them. - As you loop through them, you should call on your movie module's
get(movieTitle)
var movie = require("./movie");
var threeFavoriteMovies = [];
threeFavoriteMovies.forEach(function(film){
// your code here
})