After the command play run
, how does Play get started as a host on the machine? Does it run apache, tomcat or such behind the scenes?
If I want to get my app (built using play! framework) to be hosted on, for example, apache, is it going to be an easy task?
For running Play Framework applications with Intellij Idea tools you need to download and install Scala plugin. You can run you play-app via command line executing play run under the application root directory.
Play comes with two configurable server backends, which handle the low level work of processing HTTP requests and responses to and from TCP/IP packets. Starting in 2.6. x, the default server backend is the Akka HTTP server backend, based on the Akka-HTTP server. Prior to 2.6.
It runs netty behind the scenes. If you want to host it under a servlet container like Tomcat or Jetty, just do this from your project folder :
play war -o /tmp
and you will see your project's war file in the /tmp
folder. Stick it under webapps
folder of Tomcat or Jetty and you should be good to go. You can front-end the servlet container with Apache/httpd just like you'd do with any such set up (i.e. the fact that your war came from Playframework will not make any difference in front-ending part).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With