技術をかじる猫

適当に気になった技術や言語、思ったこと考えた事など。

Playプロジェクトを作成する

作成したいディレクトリまで移動し、下記のコマンドを実行する。

play new [プロジェクト名]

するとウィザードが起動しますので、順に回答していきます。
この例では、デフォルトディレクトリに Sample というアプリケーションを作成しています。

azalea@sample-host:~$ play new Sample
 _ _
_ __ | | __ _ _ _| |
'_ \ / _' _
__/ _ \____ \__ (_)
_ __/
play! 2.1.1 (using Java 1.7.0_21 and Scala 2.10.0), http://www.playframework.org The new application will be created in /home/azalea/Sample What is the application name? [Sample] > Which template do you want to use for this new application? 1 - Create a simple Scala application 2 - Create a simple Java application > 1 OK, application Sample is created. Have fun! azalea@sample-host:~$

すると、下記のようなディレクトリが作成されます。

ls -R Sample/
Sample/:
  README app conf project public test
Sample/app:
  controllers views
Sample/app/controllers:
  Application.scala
Sample/app/views:
  index.scala.html main.scala.html
Sample/conf:
  application.conf routes
Sample/project:
  Build.scala build.properties plugins.sbt
Sample/public:
  images javascripts stylesheets
Sample/public/images:
  favicon.png
Sample/public/javascripts:
  jquery-1.9.0.min.js
Sample/public/stylesheets:
  main.css
Sample/test:
  ApplicationSpec.scala IntegrationSpec.scala