cripox
cripox

Reputation: 542

Grails: How to run multiple apps in development env?

I have two Grails apps developing in the same time that needs to comunicate with each other.

How can I run both of them with grails run-app? If the server is already started and try to run the second app I get:

Server failed to start: LifecycleException: Protocol handler initialization failed: java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind

Upvotes: 3

Views: 2710

Answers (2)

Paras
Paras

Reputation: 824

You can also try running app like this for one of the app

grails -Dserver.port=8082 run-app

Upvotes: 2

leebutts
leebutts

Reputation: 4882

You can set

grails.server.port.http

In BuildConfig.groovy of one of the apps to something other than the default of 8080

How do they communicate though? Do they need to be in run the same Tomcat? If so then you won't be able to use run-app as this will start a new tomcat instance each time.

cheers

Lee

Upvotes: 6

Related Questions