Grails Programmer : How to change the server url of a Grails 3 App?

Sometimes you need to configure the exact server url (via domain name or ip address) of your Grails app. It is easy do it with a small configuration in your grails-app/conf/application.yml

---
environments:
    development:
        grails:
            serverURL: http://192.168.1.5:8080
    test:
        grails:
            serverURL: http://localhost:8080
    production:
        grails:
            serverURL: http://mydomain.com

Do you like to read about Groovy/Grails development? Yes, then Subscribe to Groovy Calamari a weekly curated email newsletter about the Groovy ecosystem which I write 

Leave a Reply

Your email address will not be published. Required fields are marked *