16. herokuへデプロイ
cedar stack上にアプリケーションを作成
heroku create --stack cedar
Enter your Heroku credentials.
Email: kaz.kawamura@gmail.com
Password:
Creating quiet-lightning-477... done, stack is cedar
http://quiet-lightning-477.herokuapp.com/ | git@heroku.com:quiet-lightning-477.git
Git remote heroku added
17. herokuへデプロイ
コードのデプロイ
git push heroku master
Counting objects: 6, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (6/6), 629 bytes, done.
Total 6 (delta 0), reused 0 (delta 0)
-----> Heroku receiving push
-----> Node.js app detected
-----> Vendoring node 0.4.7
-----> Installing dependencies with npm 1.0.8
express@2.2.0 ./node_modules/express
├── mime@1.2.2
├── connect@1.6.0
└── qs@0.2.0
Dependencies installed
-----> Discovering process types
Procfile declares types -> web
-----> Compiled slug size is 3.2MB
-----> Launching... done, v4
http://quiet-lightning-477.herokuapp.com deployed to Heroku
To git@heroku.com:quiet-lightning-477.git
* [new branch] master -> master
18. heroku プロセス管理コマンド
プロセスの実行数を変更
heroku ps:scale web=1
Scaling web processes... done, now running 1
プロセスのステータスを確認
heroku ps
Process State Command
------------ ------------------ ------------------------------
web.1 idle for 158h sh target/bin/webapp
ログを確認
heroku logs
2011-07-18T05:33:23+00:00 app[web.1]: Listening on 13725
2011-07-18T05:33:42+00:00 heroku[web.1]: State changed from starting to up
24. 作成するエンティティ
Topping – トッピング
Base – 生地
Pizza – ピザ
PizzaOrder – ピザの注文
entity --class ~.domain.Topping --testAutomatically
field string --fieldName name --notNull --sizeMin 2
entity --class ~.domain.Base --testAutomaticallyfield
string --fieldName name --notNull --sizeMin 2
25. entity --class ~.domain.Pizza –testAutomatically
field string --fieldName name --notNull --sizeMin 2
field number --fieldName price --type java.lang.Floatfield
set --fieldName toppings --type ~.domain.Topping
field reference --fieldName base --type ~.domain.Base
26. entity --class ~.domain.PizzaOrder --
testAutomaticallyfield
string --fieldName name --notNull --sizeMin 2
field string --fieldName address --sizeMax 30
field number --fieldName total --type java.lang.Float
field date --fieldName deliveryDate --type java.util.Date
field set --fieldName pizzas --type ~.domain.Pizza