Closed henrikra closed 8 years ago
I think this has to be something with app.get('*', function response ?
That should work, but you have to add it at the top. Right after const app = express()
:-)
Thank you jesus! It worked :D
If you look a bit further down you see a app.get('*'...
, this one picks up all get requests. Any get routes defines after it will never be checked :-) That is the reason
Thank you for explanation!
Hello
Is it possible to add example on how can I add api routes where I can get data from database form example? I tried to add app.get('/api/lol', function response(req, res) { res.write("looooooooooool"); }); to server.js and call it with jQuery $.get('/api/lol', function(result) { console.log(result); }); but Im not getting anything back.