Closed mozrat closed 7 years ago
There is an issue where hydra-router expects that the root path on a service is actually an embedded website! This is really useful when you want to offer an admin interface to a service for example. We'd have to look into this further to fix that behavior and allow the root route of a service to be accessed normally.
PRs are welcomed ;-) The easiest work-around is not to use root routes for your services. I know this isn't ideal - we'll definitely look into this closer in the next day or so.
@cjus Thanks - I understand why an embedded website on the root is a good idea, and that would work for my use case.
However, I'm not sure how to proceed. I modified my microservice so that the root URL is hooked up to this controller
api.get('/',
(req, res) => {
res.render('index', { title: 'Hey', message: 'Hello there!' });
});
and that works if I connect directly to the service, but not through the router.
Can you share an example of an embedded website?
@mozrat I should have a PR for this today. But to answer your questions above you just need to create a public folder and drop in an HTML page.
@mozrat Try the latest Hydra-router. Just updated 1.0.13.
@mozrat closing this one. Definitely ping me if there's still an issue.
Having a confusing experience with hydra-router and 2 microservices (service-auth and service-ui)
With my Docker configuration I have access to each microservice on a port that bypasses the router and I can connect to each route
But connecting through the hydra-router I am having no success
So a HTTP status 302 and 404 for the routes - how can I debug this further with hydra-cli?
Thanks for an awesome project