Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scala start Play server in production

I have a Play 2.0 app deployed on EC2 and I start the app with play start and it runs in the background, I can hit Ctrl-D and the process will continue to run in the background but then it dies after a while (15 or 20 mins?), not sure why. I usually exit the ssh session after starting the app, I'm hoping that's not the reason.

like image 509
Bob Avatar asked May 23 '12 23:05

Bob


People also ask

How do I run a play application from a production server?

Assuming that you created a production mode version of your application with the sbt dist command, deployed that zip file to a production server, and have a Play Framework 2.6 application named “myapp,” you can put a command like this in a Unix/Linux shell script to start your Play application:

What is the directory structure of a Scala project?

Project Structure Now, it’s time to load the project code into the IDE and look at the directory structure. In our project directory, we see four directories created by the sbt template: app/controllers, app/views, conf, and public. The controllers directory is where we will store our Scala code

What is the purpose of the controllers directory in Scala?

The controllers directory is where we will store our Scala code The views directory is where we’ll save our HTML templates The conf directory contains our router configuration which maps a request URL to a specific class and method

How to implement a new action in a Scala controller?

To implement a new action, we open the Scala file ( HomeController.scala) and add a new method that accepts two parameters, calculates their sum, and passes the result to the view template: Now, let’s open the index.scala.html file, add the sum parameter on top of the file, and use it in the content:


1 Answers

nohup play start works for me.

like image 114
Stephen Harrison Avatar answered Oct 08 '22 15:10

Stephen Harrison