-
Notifications
You must be signed in to change notification settings - Fork 41
Its possible to use console plugin in a grails 3 rest-api profile? #53
Comments
This is because there's no view layer in the rest-api profile. It would be possible to create a version of the plugin that only includes the server-side components and you're on your own for the UI. I tried this in a Spring Boot app using Sublime for the UI with a little plugin to POST the contents to the server and show the results in a separate pane. The Sublime side mostly worked, but Groovy and Java 8 syntax don't get along, so it kind of didn't. Here's the start of the Sublime side in case anyone wanted to pick this up and run with it: https://gist.github.com/davidkuster/634f286d24d7654b7232934ea3911262 |
Thanks for the information. A sublime plug in sound amazing. |
I just hit this today, I tried to use httpie to directly hit /console/execute, but some problems with CSRF tokens appeared, anyway I worked around the problem this way: I created my own controller method that uses |
fyi - you can disable the CSRF protection with |
Wow, I've spent half an hour looking all around grails docs for this! Should have looked here first. Thanks, will try it. |
Hi all, Not sure if I understand your question correctly. I have added this line to enable gsp support and the console is running smoothly under rest-api profile. ``compile 'org.grails:grails-plugin-gsp' |
In Grails 3.3.8 with console 2.1.1: Add and in dependencies block: |
For a Grails 5.0.1 app with rest-api profile you need to edit your build.gradle (following @aretche answer to Grails 3.3.8 #53 (comment)):
dependencies block:
|
I am trying to use console plugin in a grails 3 rest-api profile. When i try http://localhost:8080/console i get the following error in the console
I am using grails 3.1.8 and grails-console 2.0.6
I tried the plug in with a grails 3 web profile and it is working as excepted
The text was updated successfully, but these errors were encountered: