1. 準備工作
export GRAILS_HOME="/home/lundi/Java/grails-1.1.1"
PATH="$PATH:$GRAILS_HOME/bin"
export JAVA_HOME="/usr/lib/jvm/java-6-sun"
export APPENGINE_HOME="/home/lundi/Java/appengine-java-sdk-1.2.2"
3. 建立google app
4. 上傳到google App Engine
過程中,我浪費不少時間,因為之前我都用grails create-domain-class Game,都會失敗,後來改grails create-domain-class lundi.Game,才可以,好像一定要有package,或許是google App Engine規定的吧。
完成。 http://lundi326.appspot.com/
參考:
Grails on Google App Engine
Grails AppEngine plugin 裏面的介紹也很不錯
- JDK(要用JDK而非JRE,否則過程中會出錯)
- Google App Engine SDK for Java
- Grails
export GRAILS_HOME="/home/lundi/Java/grails-1.1.1"
PATH="$PATH:$GRAILS_HOME/bin"
export JAVA_HOME="/usr/lib/jvm/java-6-sun"
export APPENGINE_HOME="/home/lundi/Java/appengine-java-sdk-1.2.2"
3. 建立google app
- 建一個google App Engine帳號,並且建立一個app (http://appengine.google.com/)
- grails create-app lundi326
google.appengine.application="app-name"
- 安裝Grails AppEngine plugin及Grails web application
cd lundi326
grails uninstall-plugin hibernate
grails install-plugin app-engine
grails create-domain-class lundi.Game
grails install-plugin hibernate
grails generate-all lundi.Game
grails uninstall-plugin hibernate
grails app-engine run
4. 上傳到google App Engine
grails set-version 1
grails app-engine package
$APPENGINE_HOME/bin/appcfg.sh update target/war
過程中,我浪費不少時間,因為之前我都用grails create-domain-class Game,都會失敗,後來改grails create-domain-class lundi.Game,才可以,好像一定要有package,或許是google App Engine規定的吧。
完成。 http://lundi326.appspot.com/
參考:
Grails on Google App Engine
Grails AppEngine plugin 裏面的介紹也很不錯
2 則留言:
你的網站已經連不上去了 http://lundi326.appspot.com/
XD
googles apps有time out的限制,grails很容易連失敗,多連幾次就會成功
張貼留言