How to configure cloud9 to run a grails application? - grails

I installed gvm and grails on the C9 environment. Everything seems ok.
I run the app using this command :
grails -Dgrails.server.host=$IP -Dgrails.server.port.https=$PORT -Dapp.context=/ run-app -https
It looks like the server is launched, no error message.
But the app isn't accessible on the app-username.c9.io url
Has anyone managed to run a grails app on Cloud9 ?

Related

Which server GGTS used for grails project deploy?

GGTS having VMWare vFabric TcServer. But I want to deploy my project
on JBoss.
I'm able to add new JBoss.x AS and JBoss.x Enterprise Servers in GGTS but meanwhile if I try to deploy my application on Jboss I have an error alert message "there are no resources that can be added or removed from the server".
Same application I can deploy on default "VMWare vFabric TcServer" Server.

How to have grails run-app use https by default (without the -https command line option)

I would like to be able to run
grails run-app
and have it, by default, use ssl as if I ran
grails run-app -https
I would like this behavior for a couple reasons. The most important is that I want the Netbeans IDE grails integration to start up the https connection by default. But also, running on the command line, I won't have to remember or type the https since I always want that in my development environment.
The most important is that I want the Netbeans IDE grails integration to start up the https connection by default.
Surely this can be configured within the IDE?
also, running on the command line, I won't have to remember or type the https since I always want that in my development environment.
If you're using Linux or Mac, I would define an alias
alias run-app='grails run-app -https'
so you can get the behaviour you want simply by typing run-app on the command line. You could similarly achieve this on windows by creating a file run-app.bat whose contents are
grails run-app -https
and put this file in a directory that's on the PATH

How to solve cross domain errors when running two grails apps on localhost

I am trying to run-app my project with other wars/wars also running. So for example we have a war/ear that has legacy web services that I would like to access. My goal is to deploy those existing wars/ears with my run-app. I can deploy both separately, as grails run-app on port 8081 and jboss on port 8080. The problem was when I tried to do a ajax POST, DELETE, or PUT I get a cross-domain error because each app is on its own port. Is there a way to use run-app so that my grails project is at localhost:8080/grails and the webservices are at localhost:8080/webservices
Env: Grails 2.1.1
Server: Jboss (perfered) or vFabric tc Server (by dropping in existing war/war)
I don't believe that you can "run-app" both projects on the same port because you're running an embedded container. However, what you can do is check out the Grails CORS plugin which will allow other domains to access your grails app during run-app or otherwise.
http://grails.org/plugin/cors

how can i convert my grails application from http to https under Linux operating system?

how can i convert my grails application from http to https under Linux operating system
the configuration depends on what container you are running the application in your production environment. You should be deploying a war to your Production Server not doing a grails run-app -https
here is a stackoverflow question with a configuration for Tomcat.
I am certain you can google around and find proper configuration based on your application server
What do you mean by "convert"?
You can run the embedded tomcat with HTTPS enabled by adding -https to the run-app command:
grails run-app -https
If you want HTTPS enabled in production then you need to configure your app server to support it.

java.lang.NoClassDefFoundError: groovyx.net.http.HTTPBuilder

When I run my grails application locally under Tomcat, I get no errors. When I deploy my WAR on my remote web server, I get this exception when I try to make an AJAX request that uses HTTPBuilder.
How could this be happening?
Are you running your application is an IDE like STS? if so maybe the Jars for HTTPBuilder are in your build/run path but are not in your lib directory for the Grails app OR not listed as a "Production" Dependency.

Resources