kenp
kenp

Reputation: 500

IntelJ : run 2 applications at the same time using different port

I have two applications that need to be run at the same time. For the first app i use sbt run and the app is loaded succesfully and is listening on the port 9000. When i run the second app with sbt run i have an error saying : Failed to bind to : /0.0.0.0:9000 and it make sens since it already used by the first app but i still have the same error even when i want to run it on a different port : sbt run 9100. There's a configuration that i should manually do somewhere?

I'm using playFramework

Upvotes: 0

Views: 86

Answers (1)

Haspemulator
Haspemulator

Reputation: 11308

If you want to permanently change the port for some Play application run from sbt, put the following line into your build.sbt:

play.PlayImport.PlayKeys.playDefaultPort := 9001

Alternative ways are listed in this answer: https://stackoverflow.com/a/36246022/371804

Upvotes: 1

Related Questions