I changed some lines in my config.groovy to this:
// set per-environment serverURL stem for creating absolute links
environments {
production {
grails.serverURL = "http://www.changeme.com"
}
development {
grails.serverURL = "http://localhost:8099/${appName}"
}
test {
grails.serverURL = "http://localhost:8080/${appName}"
}
}
But when I do run-app
it still gives me
Server running. Browse to http://localhost:8080/myProject
Is there somewhere I need to tell it to use config.groovy? Why won't it go on 8099?
Another option would be to set the port for each of your applications. You can do this by adding the following setting to Build.config:
By default grails run-app always runs on port 8080. The Config.groovy settings don't effect this. To change the port use the -Dserver.port setting on the run-app command. You can find out more about it in the documentation.
That will start your application on port 8099. The Config.groovy values are used when creating absolute links.
As a follow up, you can change the default port. However, this modifies the default port for ALL of your Grails projects.
Edit the following line in $GRAILS_HOME/scripts/_GrailsSettings.groovy (approximately line 92):