Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

grails

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.

like image 617
Jason Avatar asked Oct 01 '22 00:10

Jason


1 Answers

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

like image 107
Dónal Avatar answered Oct 26 '22 07:10

Dónal