2

I don't find anything on this problem... I have two play framework apps. The first is developed with play framework 1.2.5, the second with 2.0.4. I want to know if it's possible to have these two versions on the same server.

I have a mongoDb server and I would keep this server available only in local.

So, What can you advise me?

Thanks very much !

2 Answers2

2

You just run the two versions on different ports. In Play 1.x, the setting in application.conf is

http.port=9001

For Play 2.x, it's a bit more complicated, see this question. But you only really need to change the port of one installation.

If you would want to serve both instances on port 80, you'd need to stick a proxy in front of both of them.

Community
  • 1
  • 1
Samuel
  • 1,667
  • 12
  • 18
1

If it's unix system you can create a symlinks for both versions do something like this (step by step, make sure that you're not devasting your system :) ):

bash#: which play
/usr/bin/play

# use path returned with previous 'which'
bash#: cd /usr/bin
bash#: sudo cp play play1
bash#: sudo ln -s /full/path/to/your/play-2.0.x/play play20x

So you'll be able to start your app like this:

cd /path/to/play2app
play20x run

or

cd /path/to/play1app
play1 run

For running both on port 80 use frontend HTTP server.

biesior
  • 55,576
  • 10
  • 125
  • 182