Recently I am trying to build a website with backend grails and front-end Angularjs. By struggling with folder structure to start , I found a good plugin by Craig:

To just use it , these commands are usually required:

lazybones create angular-grails myProject

./gradlew grails-create-domain-class -PgrailsArgs=MyDomainClassName

lazybones generate module -PmoduleName=myDomainClassName -PdomainClass=MyDomainClassName

./gradlew run

To open the Gradle project in IntelliJ IDEA, simply run the following task from the root:

./gradlew idea

The first build of Gradle from IDEA will fail. Launching a second build fixes the compilation error. From

To change the template which is used to generate code inside the plugin, we need to change the code inside the src/templates (Sources:templates). We can refer to lazybones template guide. The lazybones template reference is

To use spring sercurity quick start , we can use the command:

 ./gradlew grails-s2-quickstart -PgrailsArgs=' User Role'


production phase:

./gradlew -PgrailsEnv=production grails-run-app

If you want to pass in some arguments, you can do so via the grailsArgs project property:

./gradlew -PgrailsArgs='--inplace solr' grails-create-plugin


Change grails server url:

in grails-app/conf/Config.groovy

environments {
production {

grails.serverURL = "http://localhost:8080" // Specify the root of your link

development {
grails.serverURL = "http://localhost:8080/${appName}"

And add another line into Config.groovy: = '/'

In order to access from port 80 , please refer