Play framework 2.0 のためのブログです。

今回インストールするバージョンは 2.0.4 です。

① より、ソースコードをダウンロードして解凍

# wget
# unzip
# mv play-2.0.4 PLAY_HOME

② playのディレクトリへ移動し、playコマンドでアプリケーション作成
# cd [PLAY_HOME]
# ./play new アプリ名

③ コンパイルと起動
# cd [PLAY_HOME]/アプリ名
# ../play run

これで、http://~~:9000/ にアクセスすればOKです。welcomeページが見れれば成功。



# ./play
           _                      _ 
 _ __ |  |   __ _ _  _  |  |
| '_   \|  |/   _'   |   |   |  |_|
|  __/ |_|\____|\__ (_)
|_|                     |__/ 
play! 2.0.4,

> Type "help play" or "license" for more information.
> Type "exit" or use Ctrl+D to leave this console.

[アプリ名] $ 

ここで、help play と打てば、使用出来るコマンド一覧がみれます。

help play

Welcome to Play 2.0!

These commands are available:
classpath                  Display the project classpath.
clean                      Clean all generated files.
compile                    Compile the current application.
console                    Launch the interactive Scala console (use :quit to exit).
dependencies               Display the dependencies summary.
dist                       Construct standalone application package.
exit                       Exit the console.
h2-browser                 Launch the H2 Web browser.
license                    Display licensing informations.
package                    Package your application as a JAR.
play-version               Display the Play version.
publish                    Publish your application in a remote repository.
publish-local              Publish your application in the local repository.
reload                     Reload the current application build file.
run                  Run the current application in DEV mode.
test                       Run Junit tests and/or Specs from the command line
eclipsify                  generate eclipse project file
idea                       generate Intellij IDEA project file
sh         execute a shell command 
start                Start the current application in another JVM in PROD mode.
update                     Update application dependencies.

Type `help` to get the standard sbt help.


Leave a Reply