This week I learnt...

This week I learnt...

Connecting Express backend to Javascript frontend

Oct 24, 20212 min read

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...