On Fri, May 5, 2017 at 1:22 PM, iaw4 <[email protected]> wrote: > can I determine the domain and port on which my server is running *before* > I start my app?
Mojo servers don't run / listen on a domain -- they listen on IPs. As such, it'll respond to whatever domain is pointed to the IP that routes to your Mojo server. So no, I don't think you can determine the domain before you start your app. I suppose it's technically possible to do so for the port, but I don't think Mojo servers expose that information. I think the right approach to this is to use a config file. i.e. How does your app know to run on any port other than the default? Via a config, of course... So, yes, you can determine the port your server is running on by checking the config that determines the port. :) > (yes, I need it because of the cookie subdomain issues in browsers.) I don't understand. We talked about this in another thread. What's the issue? And, ultimately, what are you trying to accomplish? -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
