- Setup MongoDB
- download MongoDB (64bit 2008R2)
- Install MongoDB, run the msi
- Create data folder for Mongodb c:/mongodb/data
- Run Mongo: mongod.exe --dbpath c:/mongodb/data
- Download RoboMongo http://robomongo.org/
- Connect to localhost:27017
- Import into IntelliJ
- git checkout iat projectc:\develop\iat
- cd c:\develop\iat\src
- Run this to generate .idea project file. grails integrate-with --intellij
- Launch IDEA, select open project, select src project from c:\develop\iat\src folder.
- Configure Platform JDK: File->Project Settings->SDKs
- Configure Project JDK: File->Project Structure->Project Settings->Project
- Set Grails SDK: Tools->Grails->Change SDK version
- Run the application: Run-> Run 'Grails:src'
IntelliJ Tips
- Switch to grails view: View->Tool Windows->Grails View
- Enable: View->Tool Button to quickly switch to Grails View
- Configure Platform JDK: File->Project Settings->SDKs
- Configure Project JDK: File->Project Structure->Project Settings->Project
- Change Project name: File->Project Structure->Project Settings->Project
- Set Groovy SDK: Right click project -> Add Frameworks Support -> Check Groovy -> Create
- Set Grails SDK: Tools->Grails->Change SDK version
- Grails ships with the version of Groovy that it works with. lib/org.codehaus.groovy/groovy-all/jars/groovy-all-xxx.jar
- To run any grails command: Tools->Grails->Run target, Type in Command.
Hotkey:
- Find text: Ctrl-H
- Call hierarchy: Ctrl-Alt-H
Remote debug Grails App
Setup
- Cygwin .bashrc
alias setDebug='export JAVA_OPTS="$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"'
setDebug
- Windows
- IntelliJ: run->edit configuration -> Default->remote , all default value, save.
Run
- Cygwin: grails run-app
- IntelliJ debug "localhost:5005" (Alt-Shift-D)
No comments:
Post a Comment