Quellcode durchsuchen

Update demo script

Matt Raible vor 7 Jahren
Ursprung
Commit
ce154f6c1e
1 geänderte Dateien mit 15 neuen und 10 gelöschten Zeilen
  1. 15
    10
      DEMO.md

+ 15
- 10
DEMO.md Datei anzeigen

@@ -7,15 +7,13 @@ http https://start.spring.io/starter.zip \
7 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 11
 2. Create a JPA Repository to manage the `Beer` entity (tip: `@RepositoryRestResource`). → **boot-repository**
12 12
 3. Create a CommandLineRunner to populate the database. → **boot-command**
13 13
 4. Add default data in the `run()` method. → **boot-add**
14 14
 5. Create a `BeerController` for your REST API. Add some business logic that results in a `/good-beers` endpoint. → **boot-controller**
15 15
 6. Add a `/good-beers` mapping that filters out beers that aren't great. → **boot-good**
16 16
 
17
-Git Commit
18
-
19 17
 ## Create Ionic App
20 18
 
21 19
 Install Ionic and Cordova: 
@@ -27,13 +25,11 @@ yarn global add cordova ionic
27 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 29
 cd ionic-beer
32 30
 ionic serve
33 31
 ```
34 32
 
35
-Git Commit
36
-
37 33
 ## Build a Good Beers UI
38 34
 
39 35
 1. Run `ionic generate page beer`. 
@@ -75,7 +71,7 @@ This won't compile because `BeerModalPage` doesn't exist. Create `beer-modal.ts`
75 71
 
76 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 76
 You'll also need to modify `beer-service.ts` to have `get()` and `save()` methods. → **io-get-save**
81 77
 
@@ -119,16 +115,25 @@ To see how your application will look on different devices you can run `ionic se
119 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 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 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 137
 open platforms/ios/MyApp.xcodeproj
133 138
 ```
134 139