Reputation: 707
I have written a set of RESTful APIs by using Play Framework 2.1.0 in Java with an existing MySql database.
And now I want to deploy it on a server with Ubuntu as its operating server. And I wish all the users in the same LAN can visit it. But I don't know how to set it up.
Should I install some software like tomcat?
Upvotes: 1
Views: 1312
Reputation: 55798
You don't need to install Tomcat, Play has standalone HTTP server built-in so you can just start it on port 80 and that's all.
Of course starting the application via Play console has no sense, therefore you should prepare a dist package
as described in the docs.
If target machine will host only this one application all you need is to use start
script created by mentioned dist
command.
On the other hand it's quite useful to use some frontend HTTP server as a load balancer and reverse proxy. It will allow you to work with SSL, host many apps with virtual hosts at the same machine or even just serve public assets in CDN-like mode.
Upvotes: 3