{ Node.js Exercises. }

For this exercise, we are going to build a simple command line tool which allows us to make a request to an API and store the data in a text file! We will be using the following modules:

fs - for reading and writing to a file
process - for gathering arguments from the command line
request - for making API requests (this is an external module)

This application should accept a command line argument using process.argv. The command line argument should be the name of a movie and your application should make an API request to the omdb API and output the plot of the movie. Your program should also save the name of the movie to a file called results.txt.

Bonus

  1. Use the prompt module to ask a user for some input instead of having to pass in an argument from the command line.
  2. Your program should accept a command line argument called leaderboard. If that command line argument is passed in, your application should return the most popular search based on how many times it appears in results.txt

When you're ready, move on to Introduction to Express.js

Continue