express-postgres-starter icon indicating copy to clipboard operation
express-postgres-starter copied to clipboard

The app doesn't return anything

Open mrfzd opened this issue 5 years ago • 1 comments

I don't know if there is a bug with the app itself or the routes, the app doesn't returns anything apart from the default page, please take a look at the screenshot below.

image

The docker-compose up works fine, so does the app's default index page displaying "OK" only, however the api/* routes doesn't!

Thanks

mrfzd avatar Sep 16 '20 15:09 mrfzd

When you type this api/users url in your browser it sends GET request to the endpoint. And when you look at the code, there's only POST handler in the api. If you add sth like router.get('/', (req, res) => { res.send('works!'); }); to api/users.js, it should display sth in your browser. If you want to test POST endpoint try using sth like Postman or curl.

mieszkosabo avatar Feb 17 '21 09:02 mieszkosabo