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

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

① http://www.playframework.org/ より、ソースコードをダウンロードして解凍

# wget http://download.playframework.org/releases/play-2.0.4.zip
# unzip play-2.0.4.zip
# mv play-2.0.4 PLAY_HOME

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

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

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


ちなみにwelcomeページはこんなの。

また、コンソールモードも存在する。

# ./play
           _                      _ 
 _ __ |  |   __ _ _  _  |  |
| '_   \|  |/   _'   |   |   |  |_|
|  __/ |_|\____|\__ (_)
|_|                     |__/ 
             
play! 2.0.4, http://www.playframework.org

> 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.

Categories:

Leave a Reply