DEV Community

Discussion on: Building a Desktop App with Vue: Vuido

Collapse
 
ismaelamezcua profile image
Ismael Amezcua

Superb introduction to Vuido. Just a heads up, if your are copy/pasting the code into your application, there is a missing } on the following line:

axios
  .get(
    `/weather?q=${this.query&units=metric&&appid=<YOUR_API_KEY>`,
   )

It should be

axios
  .get(
    `/weather?q=${this.query}&units=metric&&appid=<YOUR_API_KEY>`,
   )

You could also declare a variable for your API key so it would be easier to import from env variables:

const apiKey = process.env.API_KEY;

axios
  .get(
    `/weather?q=${this.query}&units=metric&&appid=${apiKey}`,
   )
Collapse
 
n_tepluhina profile image
Natalia Tepluhina

Thanks for spotting this and for the advice! Fixed ;)