This is the code base for the Java User Group application presented on February 1, 2011.
- Java: 1.6 or above
- Grails 1.3.7
The project consists of 2 applications and one plugin.
- moviestore - Grails application which represents the UI
- movie-rest - Grails application which exposes a REST API
- movie-domain - Grails plugin which consists of the domain model
Before running either moviestore or movie-rest, you must do the following:
- CD into the movie-domain directory
- Run the command, grails package-plugin
- CD into moviestore application
- Run the command, grails install-plugin ../movie-domain/grails-movie-domain-0.1.zip
- CD into movie-rest
- Run the command, grails install-plugin ../movie-domain/grails-movie-domain-0.1.zip
The moviestore and movie-rest applications are setup to work on one machine by default. In order to run both applications do the following:
- CD into moviestore directory
- Run the command, grails run-app
- Open new terminal
- CD into movie-rest directory
- Run the command, grails -Dserver.port=8081 run-app
Since the application was designed to run on a single machine, you will need to change one setting first.
- Open moviestore application in your favorite editory.
- Modify the line static restEndpoint = "http://localhost:8081/movie-rest/" to the ip address and port you have the movie-rest application on
Note: Typically, endpoints are stored in Config.groovy or other config file. We have the endpoint configured in class for demo purposes.