$ grails create-app myapp --profile=rest-api
http://docs.grails.org/latest/guide/single.html#webApiAndAngularProfiles
grails/grails-core#10377 (ref. spring-projects/spring-boot#7360)
Downgrading to tomcat 8.5.5
ext {
set "tomcat.version", "8.5.5"
}
Add the following tasks:
task stage() {
dependsOn clean, war
}
tasks.stage.doLast() {
delete fileTree(dir: "build/distributions")
delete fileTree(dir: "build/assetCompile")
delete fileTree(dir: "build/distributions")
delete fileTree(dir: "build/libs", exclude: "*.war")
}
war.mustRunAfter clean
task copyToLib(type: Copy) {
into "$buildDir/server"
from(configurations.compile) {
include "webapp-runner*"
}
}
stage.dependsOn(copyToLib)
Add this to dependencies {}
compile 'com.github.jsimone:webapp-runner:8.5.5.2'
Add a file named: Procfile and then copy/paste the following line:
web: java -Dgrails.env=prod -jar build/server/webapp-runner-*.jar --expand-war --port $PORT build/libs/*.war