JavaScript Node.js Basics Create a Command Line Weather Application Project Overview

Jake Kobs
Jake Kobs
9,212 Points

Project error: unable to determine the domain name

I've been searching on https://openweathermap.org/current#current_JSON for a JSON file that has either http or https as a domain, but all I see are api at the beginning of the site name. Is it possible to do:

const api = require("api")

and use that name to call the get method?

2 Answers

Adam Beer
Adam Beer
11,267 Points

Can not use require method. Create a new file for API. Create a new file, and add name to, like this api.json. Inside the app.json add to the parameters. What happens? Hope this help

Antti Lylander
Antti Lylander
9,659 Points

open weather map's api uses http protocol. You need an api-key first.