lundi 14 octobre 2019

Grails: serving static content

If you are using the Angular profile for Grails, you might want to serve your compiled Angular code when reaching the server on '/'

First ensure the angular project compiles to ../server/src/main/webapp by changing the outputDir and outputPath.

The modify the UrlMapping to add:

"/"(uri: "/index.html")

And add in the services.yml:

grails:
  resources: # resolve index.html without the static prefix...    pattern: /**

Aucun commentaire:

Enregistrer un commentaire