Skip to content

den-wdi-2/requesting-with-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Homework: Requesting with Node

Tonight you need to use Node.js to make a request to OMDB.

  • Fork and clone this repo.
  • npm install to install request
  • Define movie.js and an app.js.

movie.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 node to verify it works!

app.js

  • The app should require your movie module.
  • You should define your threeFavoriteMovies as 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)

Starter Code: app.js

var movie = require("./movie");
var threeFavoriteMovies = [];
threeFavoriteMovies.forEach(function(film){
  // your code here
})

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published