Welcome! This project is a demo of a Single Page Application created using:
- AngularJS for a pure HTML/JS front-end application (
frontendfolder), using Angular's$resourceto communicate with the server. This project can be built and run using Yeoman (Yo, Grunt and Bower). - Grails for the backend (
backendfolder), using Grails 2.3.1 excellent capabilities for serving a REST API. The application is meant to be used in standalone mode (with Jetty embedded)
This is the companion code of my talk "Developing SPI applications using Grails and AngularJS".
-
Install Yeoman (note: you don't need Grails. It will be downloaded automatically) and Compass:
npm install -g yo sudo gem install compass -
Make sure you have
yo,gruntandbowercommand line tools:yo --version grunt --version bower --version -
Start the backend:
cd backend ./grailsw compile && ./grailsw build-standalone java -jar target/standalone-0.1.jar -
Install frontend dependencies (you need to do this only once):
cd ../frontend npm install bower update -
Start the frontend:
grunt server
-
Setup API security using:
- Spring Security Core in the backend.
- http-auth-interceptor in the frontend.
-
Setup API documentation using Swagger.