Grails Programmer : How to change the default port where your Grails App runs?

If you create a Grails 3 app and run it; it will start at port 8080.

$  grails --version
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Duser.language=en -Duser.region=US
| Grails Version: 3.0.14
| Groovy Version: 2.4.5
| JVM Version: 1.8.0_45
$  grails create-app testnewport
| Application created at /Users/groovycalamari/Documents/tests/testnewport
$ cd testnewport
$ grails run-app
Grails application running at http://localhost:8080 in environment: development

If you want to start it at a different port add to your application.yml the next block:

---
server:
 port: 28080

And voila:

Grails application running at http://localhost:28080 in environment: development

My next events:
๐Ÿ—“ May 27 09:00 AWS Dublin - Micronaut and AWS Lambda
๐Ÿ—“ Jul 20 09:00 Workshop Security in the Micronaut Framework
๐Ÿ—“ Sep 20 09:00 JCON Online 2022 - Getting Started with the Micronaut Framework
๐Ÿ—“ Sep 23 09:00 JCON Online 2022 - Micronautยฎ Framework and Microstream Java-native persistence engine

Tags: #grails
Feb 2016, 23.