GoConqr has a new look! Let us know what you think.

Module 22 of 22 · Media

NE-5. OpenWeather API, process.argv and files

Kostas Diakogiannis

NE-5. OpenWeather API, process.argv and files

NE-5. OpenWeather API with process.argv and file writing

OK! Let's try to make a final assessment of what we have learned on all basic node.js skills. 

We will try to combine everything in one exercise. You will have to run a script from node.js command line that will be of the form `node index.js rome` and this will bring all the information for the current weather from Rome and will write it (append it) into a new line of a .txt file. 

If you run again with another city, then the name  of the city and the temperature of it for that day should be written in a new line below the previous one. So the format of your .txt after 5 request to Berlin, Stockholm, Hamburg, Beijing, Tokyo should like like this:

Berlin 15°c 

Stockholm 11°c 

Hamburg 13°c 

Beijing 17°c 

Tokyo 9°c 

Have fun!

Instructions

You must submit an attempt for this quiz to progress. You can submit it after the last question.

Go to the chosen module

Feedback

What is it about?

What do you think of the new look?

How do you like it?