playframeworkを試す(helloworldのみ)
環境
インストール環境
Javaのみ
sbtをインストール
brew install sbt
↓
% sbt version [info] welcome to sbt 1.5.1 (N/A Java 15.0.2) [info] loading project definition from /Users/xxxx/project [info] set current project to shigeharu (in build file:/Users/shigeharu/) [info] 0.1.0-SNAPSHOT %
helloworldを取得して、実行
手順
wget https://example.lightbend.com/v1/download/play-samples-play-java-hello-world-tutorial -O play-java-helloworld.zip unzip play-java-helloworld.zip cd play-samples-play-java-hello-world-tutorial sbt run
↓ デフォルトのポートは9000のよう
ディレクトリ構成
. ├── LICENSE ├── NOTICE ├── README.md ├── app ├── build.sbt ├── conf ├── logs ├── project ├── public ├── sbt ├── sbt-dist ├── sbt.bat ├── scripts ├── target └── test
テンプレートを利用して、プロジェクトを作成
手順(テンプレートをwebから拾ってくるため、多少時間がかかります)
mkdir sample1 cd sample1 sbt new playframework/play-java-seed.g8 cd sample1 cd sample1 sbt run
↓ うーん、寂しい
ディレクトリ構成
. ├── project │ └── target ├── sample1 │ ├── app │ ├── build.sbt │ ├── conf │ ├── logs │ ├── project │ ├── public │ ├── target │ └── test └── target ├── global-logging └── task-temp-directory
とりあえず、ここまで