Grails: How to run multiple apps in development env?
I have two Grails apps developing in the same time 开发者_JS百科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
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
You can also try running app like this for one of the app
grails -Dserver.port=8082 run-app
精彩评论