Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to work with angular 2 profile for grails

Tags:

angular

grails

it's great news that Grails 3.2.1 now comes with an Angular2 profile, but I don't know how to use it.

The profile description tells me that there should be the standard command like create-domain-class, but when I create an app through

grails create-app test-ng --profile angular2

I get a working angular2 project, but it even seems that this project is not recognized as grails app. When I enter the grails cli, I only get the commands like create-app which are available outside of projects.

What am I doing wrong?

like image 389
rdmueller Avatar asked Jan 06 '23 04:01

rdmueller


2 Answers

your grails create-app test-ng --profile angular2 command should have created three folders in your test-ng-project-folder:

  • client
  • gradle
  • server

change to server and start grails command

now you should have the wellknown grails project. but i am still on the first steps of examining the new grails-profile. so i hope i could help you.

like image 138
Frank Beer Avatar answered Jan 13 '23 15:01

Frank Beer


Nowadays this layout is called "multi-project". Separate 4 the client and server applications. To make things easier, the tasks test, integrationTest, and bootRun have been created in the client application to make executing those tasks easier across the whole application.

Since Gradle executes tasks synchronously, and the bootRun task will never finish, it is important to execute it in parallel. At the root of the project:

./gradlew bootRun --parallel

Opening things also separately by 2 instances of your IDE or preferred text processor.

see the docs

like image 37
michael Avatar answered Jan 13 '23 16:01

michael