Hi Im starting to learn how apis works and got my first stucktrace. The thing is that Im trying this code
const app = require('express')();
const PORT = 8080;
app.get('/tshirt', (req , res) => {
res.status(200).send({
tshirt: 'blue',
size: 'large'
})
});
But Insomnia show me "Cannot GET /tshirt" and 404 at 'http://localhost:8080/tshirt'
So my question is why this doesnt work?
Additional information: On firefox I cant run 'http://localhost:8080/tshirt' instead I have to run 'localhost:8080/tshirt'. But on Insomnia I cant test 'localhost:8080/tshirt' and have to run 'http://localhost:8080/tshirt'.