Play Framework create IntelliJ Project

Posted on Thursday, August 22, 2013


My IDE of choice these days is IntelliJ.  Fortunately for me the Play tool can quickly add the files to a Web App to make it an IntelliJ project.

This article assumes you have already created a Web App using the Play command line tool.

If you are unfamiliar with setting up the Play Framework and creating your first Hello World using the play command you can look at this post I made http://www.whiteboardcoder.com/2013/08/scala-play-hello-world.html [1]





From the Web App folder run the following command


> play idea


  
Open the Project in IntelliJ

If the Web App is not running start it up, from the Web App folder run



> play -Dhttp.port=80 ~run




Edit the Web App in some way in IntelliJ


 

For me I was using a simple HelloWorld Application. So I opened
 Application.scala in the app -- > Controllers folder for editing.




And changed the text output to "Latest Change" and saved it.


The Web App will recompile automatically.






Refresh the Web App and you should see the Text Change.



Eclipse


I won't go into great detail here but you can alternatively create an eclipse project.   The Play command tool can create IntelliJ projects or Eclipse.



> play eclipse





References
[1]  Scala Play Hello World
       Visited 8/2013




No comments:

Post a Comment