How do we change the default port 8080 to something else in Grails 3.0.9?
Asked
Active
Viewed 673 times
0
-
Have you tried `grails run-app -Dserver.port=8082` – Shashank Agrawal Nov 13 '15 at 11:10
-
For some reasons passing it through args was not working in my environment. Probably I will rephrase my question as an alternative to passing args. Thanks! – kgthegreat Nov 17 '15 at 05:56
1 Answers
3
Through command line
This answer has a way which works
grails run-app --port=8090
Also, while stopping
grails stop-app --port=8090
The following may or may not work depending on grails version
grails run-app -Dserver.port=8090
Through configuration
Say to change it to 8090, add the following snippet to grails-app/conf/application.yml
server:
port: 8090
under
environments:
development:
so that it looks like
environments:
development:
server:
port: 8090

Community
- 1
- 1

kgthegreat
- 1,172
- 9
- 10
-
For most cases putting it under `environments.development` is fine but not necessary. – Jeff Scott Brown Nov 13 '15 at 14:17