Skip to content

Stavush/workshop-5-MondayU

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

workshop-5

Fork this repo

Logger module

Create logger module as a new package that accepts a log and appends the log to a log file (creates one if it doesn’t exist)

  1. npm init
  2. create logger, like this only stdout is needed (logs)
  3. use console options: {'flags': 'a'} to append
  4. export your logger function
  5. update package.json main if your script isn't index.js
  6. npm publish 🚀
    • hint, you'll need to change the package name

Weather App

Create new app for fetching weather service data

  1. Create a GET handler with native http module.
  2. Use open weather api client with this service (sign up required) to get temp at city ID 293397 (tel aviv)
  3. GET ‘localhost:8000’ should return the current weather at Tel Aviv (or some other place) in some format, not important;
  4. check this with your browser or with curl localhost:8000 or with postman
  5. Install your own published logger
  6. Log the fetched temp of every request made
  7. Bonuses:
    • Link your logger to your local package
    • (only after finishing): return data in a 1, nice html format
    • Accept query params for which city id or location to check the weather for.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%