Skip to content

Commit

Permalink
Update script-weatherNode.js to fetch and display weather for default…
Browse files Browse the repository at this point in the history
… city on page load and for user-input city on button click.
  • Loading branch information
Andrehlb committed Dec 19, 2023
1 parent 3d5f9ac commit 47c6f35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion weather-node/public/script-weatherNode.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function fetchWeather(city) {
fetch('/weather?city=${city}')
fetch(`/weather?city=${city}`)
.then(response => response.json())
.then(data => {
const weatherDiv = document.getElementById('Weather');
Expand Down

0 comments on commit 47c6f35

Please sign in to comment.