Skip to content

Commit

Permalink
fetch data at startup
Browse files Browse the repository at this point in the history
  • Loading branch information
fss committed Feb 28, 2020
1 parent 7ef0996 commit 0665030
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ server.listen(port, err => {
log(`unable to listen on port ${port}: ${err}`)
} else {
log(`listening on port ${port}`)

setInterval(fetchData, interval)
fetchData().then(() => setInterval(fetchData, interval))
}
})

0 comments on commit 0665030

Please sign in to comment.