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}`, )
Thanks for spotting this and for the advice! Fixed ;)
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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:It should be
You could also declare a variable for your API key so it would be easier to import from env variables:
Thanks for spotting this and for the advice! Fixed ;)