Bladeren bron

Update demo script

Matt Raible 7 jaren geleden
bovenliggende
commit
ce154f6c1e
1 gewijzigde bestanden met toevoegingen van 15 en 10 verwijderingen
  1. 15
    10
      DEMO.md

+ 15
- 10
DEMO.md Bestand weergeven

7
 dependencies==data-jpa,data-rest,h2,web,devtools -d
7
 dependencies==data-jpa,data-rest,h2,web,devtools -d
8
 ```
8
 ```
9
 
9
 
10
-1. Open project in IntelliJ IDEA. Create a `Beer` entity class in `src/main/java/com/example/beer`. → **boot-entity**
10
+1. Open project in IntelliJ IDEA. Create a `Beer` entity class in `src/main/java/com/example/demo/beer`. → **boot-entity**
11
 2. Create a JPA Repository to manage the `Beer` entity (tip: `@RepositoryRestResource`). → **boot-repository**
11
 2. Create a JPA Repository to manage the `Beer` entity (tip: `@RepositoryRestResource`). → **boot-repository**
12
 3. Create a CommandLineRunner to populate the database. → **boot-command**
12
 3. Create a CommandLineRunner to populate the database. → **boot-command**
13
 4. Add default data in the `run()` method. → **boot-add**
13
 4. Add default data in the `run()` method. → **boot-add**
14
 5. Create a `BeerController` for your REST API. Add some business logic that results in a `/good-beers` endpoint. → **boot-controller**
14
 5. Create a `BeerController` for your REST API. Add some business logic that results in a `/good-beers` endpoint. → **boot-controller**
15
 6. Add a `/good-beers` mapping that filters out beers that aren't great. → **boot-good**
15
 6. Add a `/good-beers` mapping that filters out beers that aren't great. → **boot-good**
16
 
16
 
17
-Git Commit
18
-
19
 ## Create Ionic App
17
 ## Create Ionic App
20
 
18
 
21
 Install Ionic and Cordova: 
19
 Install Ionic and Cordova: 
27
 From a terminal window, create a new application using the following command:
25
 From a terminal window, create a new application using the following command:
28
 
26
 
29
 ```
27
 ```
30
-ionic start ionic-beer --v2
28
+ionic start ionic-beer
31
 cd ionic-beer
29
 cd ionic-beer
32
 ionic serve
30
 ionic serve
33
 ```
31
 ```
34
 
32
 
35
-Git Commit
36
-
37
 ## Build a Good Beers UI
33
 ## Build a Good Beers UI
38
 
34
 
39
 1. Run `ionic generate page beer`. 
35
 1. Run `ionic generate page beer`. 
75
 
71
 
76
 Create `beer-modal.html` as a template for this page. → **io-beer-modal-html**
72
 Create `beer-modal.html` as a template for this page. → **io-beer-modal-html**
77
 
73
 
78
-Import `BeerModalPage` in `beer.ts` and add it to the `declarations` and `entryComponent` lists in `beer.module.ts`.
74
+Import `BeerModalPage` in `beer.ts` and add it to the `declarations` and `entryComponents` lists in `beer.module.ts`.
79
 
75
 
80
 You'll also need to modify `beer-service.ts` to have `get()` and `save()` methods. → **io-get-save**
76
 You'll also need to modify `beer-service.ts` to have `get()` and `save()` methods. → **io-get-save**
81
 
77
 
119
 To emulate or deploy to an iOS device, you’ll need a Mac and a fresh installation of [Xcode](https://developer.apple.com/xcode/). If you’d like to build iOS apps on Windows, Ionic offers an [Ionic Package](http://ionic.io/cloud#packaging) service.
115
 To emulate or deploy to an iOS device, you’ll need a Mac and a fresh installation of [Xcode](https://developer.apple.com/xcode/). If you’d like to build iOS apps on Windows, Ionic offers an [Ionic Package](http://ionic.io/cloud#packaging) service.
120
 
116
 
121
 ```
117
 ```
118
+npm install -g ios-sim
122
 ionic cordova emulate ios
119
 ionic cordova emulate ios
123
 ```
120
 ```
124
 
121
 
122
+If this fails, run the following to open/deploy the project.
123
+
124
+```
125
+open platforms/ios/MyApp.xcodeproj
126
+```
127
+
125
 The biggest problem I found when running the app in Simulator was that it was difficult to get the keyboard to popup. To workaround this, I used Edit > Hardware > Keyboard > Toggle Software Keyboard when I needed to type text in a field.
128
 The biggest problem I found when running the app in Simulator was that it was difficult to get the keyboard to popup. To workaround this, I used Edit > Hardware > Keyboard > Toggle Software Keyboard when I needed to type text in a field.
126
 
129
 
127
-To deploy the app to an iPhone, start by plugging your iOS device into your computer. Then run the following commands to install ios-deploy/ios-sim, build the app, and run it on your device.
130
+In order to deploy the app to a phone, you'll need to deploy the backend to a public server. Copy `deploy.sh` from 
131
+[spring-boot-ionic-example](https://github.com/oktadeveloper/spring-boot-ionic-example) and run it to deploy the backend
132
+to Cloud Foundry.
133
+
134
+If this fails, run the following to open/deploy the project.
128
 
135
 
129
 ```
136
 ```
130
-npm install -g ios-deploy ios-sim
131
-ionic build ios --prod
132
 open platforms/ios/MyApp.xcodeproj
137
 open platforms/ios/MyApp.xcodeproj
133
 ```
138
 ```
134
 
139