angularjs - Grails 3.0 static html in run-app -


similar questions have been asked before, regarding grails 2(.3, .4). find strange not find way this, seems standard use-case me.

i want serve html-pages, including linked .css , .js (angular , jquery content) when run grails run-app.

i want check if http-calls handeled correctly on both sides - without needing deploy .war , configuring database.

afaik grails run-app starts jetty/tomcat - both of can serve .html pages. have make grails development-tooling deploy files?

i need make http-requests, using different server violate js-sop, while deploying .war slow down development process

i've far found clunky jsonp, proxy, .war deployment solutions, or solutions grails 2.x

i tried placing files literally everywhere in projects' structure (/src/main, /src/main/resources, /src/main/public, assets folder , subfolders, created web-app directories in every subdirectory, init, domain, conf directories - name it)

add index.html src/main/resources/public

then add urlmappings.groovy:

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


grails >= 3.0.12

location of static resources

in order resolve issue around how post requests treated rest applications on non-existent resources, static resources located in src/main/resources/public resolved under /static/** uri default, instead of base uri /**. if wish restore previous behaviour add following configuration:

grails.resources.pattern = '/**'

https://github.com/grails/grails-core/releases/tag/v3.0.12


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -