Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

grails run-app on localhost:8080 instead of :8080/appName?

Is there a way to get grails run-app to launch on localhost:8080/ instead of localhost:8080/${appName}?

In Config.groovy,, setting grails.serverUrl has absolutely no effect - it only seems to affect absolute url generation of different grails methods.

In production, I use apache virtualhosts to mask site.com:8080/appName as site.com. I want to make my test configuration match production.

like image 446
Stefan Kendall Avatar asked Feb 15 '11 04:02

Stefan Kendall


2 Answers

How about

grails.app.context = "/"

in Config.groovy, as per this jira discussion?

like image 91
Raghuram Avatar answered Nov 10 '22 00:11

Raghuram


If you are running Grails 3.1.1 you can add the following line to your
grails-app/conf/application.yml file to bring back the http://localhost:8080/appName functionality:

server:
    'contextPath': '/appName'

Replace appName with your application's actual name (i.e. the folder name that the grails-app folder is in).

like image 32
specialk1st Avatar answered Nov 09 '22 23:11

specialk1st