Connecting Express backend to Javascript frontend
This was something that confused me until recently.
The set up
Let's say you have your server running on port 8000 with this code:
app.get('/api', async (req, res) => {
// get some data from an API
console.log(data)
res.json(data)
})
If you go...
blog.nicm42.me.uk2 min read