1

I've seen people reporting how to serve static HTML content directly from Nginx that appfog employs with node.js and python apps.

Has anyone managed to do this with a Java based application?

I'm using grails, but I'd like to develop a straight HTML front end with JSON based services backing it up. I've decided to go with JS templating instead of GSP on this one.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
barrymac
  • 2,750
  • 1
  • 20
  • 32

1 Answers1

0

Co-incidentally, I am working in a similar kind of architecture right now.

I have a Grails app (v2.2.0) working as the base app framework. AngularJS used in the front end instead of GSP. I am hosting json based RESTful services in the Grails App and AnugularJS consumes it(right now), knowing the fact that AngularJS comes with its own flavor of MVC which makes it very convenient not to manipulate DOM in the view layer. AngularJS' Dependency Injection and Dynamic data Binding helps creating a convenient single page app which is free of control logic, scripts and other non-DOM related structures. The plan right now is not to put the app in cloud but it happens to be a right candidate for the shift.

App Summary:

Single Page Plain HTML -> Angular App(controller <> model <> directives <> services) -> RESTful call to same Grails App -> RESTful call to core business model

Co-indecently again this app has moved to QA today and till now the experience in DEV has been awesome. On a side note, I am also working on the MEAN stack which I think is promising too.

dmahapatro
  • 49,365
  • 7
  • 88
  • 117