It's great that you modularised your API call in a separate file. However, the point of modularisation is that you create functions that can be reused multiple times. At the moment, the function in your API call is very much tailored to your weather API, so you wouldn't be able to use it with a call to another API.
I would suggest that you make the api.js function more generic i.e. reusable by moving the logic specific to the weather API into the callback definition in handle input in handlers.js
You also need to uncomment the response.writeHead part in this function as you’re currently not returning a status code in a success case
It's great that you modularised your API call in a separate file. However, the point of modularisation is that you create functions that can be reused multiple times. At the moment, the function in your API call is very much tailored to your weather API, so you wouldn't be able to use it with a call to another API.
I would suggest that you make the api.js function more generic i.e. reusable by moving the logic specific to the weather API into the callback definition in handle input in handlers.js
You also need to uncomment the response.writeHead part in this function as you’re currently not returning a status code in a success case