I'm building a small microservice with express, and I'd like to know how to avoid undefined routes, i.e:
In my API, I'v defined just and endpoint,
/api/myendpoint
Which works as expected, but if I send any kind of reques to the same host+server where express is running, i.e
/api/route/dont/exist
I get a ugly html response, which I would like to avoid, or return some kind of custom message
I been digging a bit but I coulnt find any solution
Thanks in advance!