How to change grails graphics server port?

I am using grails 2.0.4. And I want to use port: 8090 instead of 8080 for localhost. So you need help changing the port to 8090 forever.

+89
grails
Jun 08 2018-12-12T00:
source share
11 answers

There are two options:

  • Change grails.serverURL in Config.groovy from "http://localhost:8080/${appName}" to "http://localhost:8090/${appName}" .
  • Run grails with -Dgrails.server.port.http=8090 on the command line. Set the GRAILS_OPTS environment GRAILS_OPTS to -Dgrails.server.port.http=8090 so that it is automatically applied.
+104
Jun 08 2018-12-12T00:
source share

This solution adds to the answers to https://stackoverflow.com/a/318901/ In Grails 2.x, add the following to BuildConfig.groovy :

 grails.server.port.http = 8090 

See Http://forum.springsource.org/archive/index.php/t-97024.html for more information.

+123
May 03 '13 at 12:27
source share

If you are using the NetBeans IDE, install the following:

Configuration: → BuildConfig.groovy: → grails.server.port.http = 8090 and restart the server.

Without an IDE, enter the command line -:

 grails -Dserver.port 8090 run-app 

or

 grails -Dserver.port=8090 run-app 
+36
Aug 05 '14 at 7:22
source share

For grails 3 you can put this in your application.yml

 server: port: 9999 
+15
Jun 30 '16 at 22:41
source share

If you are using the IntelliJ IDE, then

In the application menu, click "Run → Change configurations ... → Virtual machine settings: -Dgrails.server.port.http = 8180

+5
Jan 07 '15 at 9:20
source share

grails run-app -Dserver.port = 8090

Or use a different port number

In Intellij: Ctrl + Alt + G (general keyboard); Cmd + Alt + G (Mac keyboard) and use only:

run-app -Dserver.port = 8090

+5
Nov 20 '15 at 2:43
source share

Command line: grails run-app -port 8090

+4
May 18 '16 at 1:14
source share

Run the command (Ctrl + Alt + g)

  • Prior to Grails 2.x: run-app -Dserver.port=8090
  • For grails version 3.x: run-app --port=8090
+4
Dec 21 '17 at 5:35
source share

You did not say which IDE you are using. If you use Netbeans, you simply right-click on the project name and select "Properties". From the general settings category, you can easily change the server port to whatever you like.

0
Jun 11 2018-12-12T00:
source share

You can start the Grails application using the following command on the terminal. port 8080 works by default.

Grails Run-App -Dserver.port = 9090

This will launch the application on port 9090.

0
Mar 27 '18 at 4:47
source share

Type the following at a command prompt:

 grails -Dserver.port=8090 run-app 
0
Aug 04 '18 at 5:18
source share



All Articles