|
21 | 21 | === "Using OpenShift web terminal" |
22 | 22 | - In the OpenShift web console, head up to **Topology** menu on the left on the **Developer** perspective and click **Create a new project** |
23 | 23 |
|
24 | | -  |
25 | | - |
26 | 24 | - Give a name to your project, call it `dev-{your initials}`, the other fields are optional |
27 | 25 |
|
28 | | -  |
29 | | - |
30 | 26 | - Initialize a web terminal using the `>_` button on the top bar next to your name on the cluster. You should have a terminal with all the necessary development tools |
31 | 27 |
|
32 | 28 |  |
|
74 | 70 | ### Choose your development environment |
75 | 71 |
|
76 | 72 | === "Gitpod" |
77 | | - - Head over to [gitpod.io](https://gitpod.io), login with your github account |
| 73 | + - Head over to [gitpod.io](https://gitpod.io), login with your github account by clicking **Continue with GitHub**. |
78 | 74 |
|
79 | | -  |
| 75 | + - Grant Access to gitpod to your GitHub organization by going to account settings on the top right corner, navigate to **Integrations**, go to GitHub and click **Manage on GitHub**. |
80 | 76 |
|
81 | | - - Create a new workspace with the repository you created earlier |
| 77 | + - On GitHub, search the organization you have used to create the repository and click **grant** to allow gitpod to access repositories in that organization. |
82 | 78 |
|
83 | | -  |
| 79 | + - Back to [gitpod.io](https://gitpod.io), navigate to workspaces and click **New Workspace** to create a new workspace, give it your newly created repository URL. |
84 | 80 |
|
| 81 | + - If it is your first gitpod workspace, it will ask you for your preferred editor, pick the in-browser Visual Studio Code, and the workspace will be created automatically for you. |
85 | 82 | - Pick Visual Studio Code on the browser as an editor. After waiting some time, you should have an editor on your browser with the code on it. Gitpod will automatically run the application at first launch |
86 | 83 |
|
87 | | -  |
88 | | - |
89 | | - - Because Gitpod adds a couple more files in the repository, add at the end of the `.gitignore` file a line with `node_modules` to prevent pushing it to the repository |
90 | | - |
91 | | -  |
92 | | - |
93 | | - You are now ready to modify the application |
| 84 | + You are now ready to modify the application! |
94 | 85 |
|
95 | 86 | === "Locally" |
96 | 87 | Clone the project and open it using your favorite text editor or IDE (Visual Studio Code, IntelliJ...). |
97 | 88 |
|
| 89 | + ```sh |
| 90 | + git clone https://github.com/cnw-team-{team}/inv-svc-{your initials}.git |
| 91 | + cd inv-svc-{your initials} |
| 92 | + code . |
| 93 | + ``` |
| 94 | + |
98 | 95 | Spring Boot uses annotations to configure the various components that will be injected into and |
99 | 96 | used by the applications. A class with the `@SpringBootApplication` annotation is the starting |
100 | 97 | point for the rest of the application components to be loaded. Additionally, a `@ComponentScan` |
@@ -167,11 +164,6 @@ We will start by creating the initial application component. |
167 | 164 | git push |
168 | 165 | ``` |
169 | 166 |
|
170 | | -!!! note |
171 | | - Pushing code from Gitpod into a Github organization might fail. For that you will need to grant Gitpod access to your organization. |
172 | | -  |
173 | | - |
174 | | - |
175 | 167 | ### Add StockItem controller |
176 | 168 |
|
177 | 169 | In Spring Boot, the `@RestController` annotation tells the framework that the class provides a |
@@ -306,19 +298,15 @@ for the REST service. |
306 | 298 | ``` |
307 | 299 |
|
308 | 300 | === "Gitpod" |
309 | | - - Gitpod should prompt you to make your app public, make it so |
| 301 | + - Go to the **Remote explorer** tab at the left of the Gitpod editor, you should see the port where your application is running, which is port `9080` in our case. |
| 302 | + Click on the **open browser** button (the globe icon). |
310 | 303 |
|
311 | | -  |
312 | | - |
313 | | - - Go to the **Remote explorer** tab at the left of the Gitpod editor, you should see the port where your application is running. Click on the **open browser** button |
314 | | - |
315 | | -  |
316 | | - |
317 | | - - You should see the swagger-ui window open |
318 | 304 |
|
319 | 305 | === "Locally" |
320 | | - - When the server starts, open a browser to [`http://localhost:9080/swagger-ui.html`](http://localhost:9080/swagger-ui.html) to view the swagger documentation. You should see the stock item entry in the list |
| 306 | + - When the server starts, open a browser to [`http://localhost:9080/swagger-ui.html`](http://localhost:9080/swagger-ui.html) |
321 | 307 | --- |
| 308 | +- You should see the swagger-ui window documentation with the stock item entry in the list |
| 309 | + |
322 | 310 | - Commit and push the changes to Git. |
323 | 311 |
|
324 | 312 | ```bash |
@@ -620,15 +608,9 @@ should be placed in a component that is given a `@Service` annotation. |
620 | 608 | ``` |
621 | 609 |
|
622 | 610 | === "Gitpod" |
623 | | - - Gitpod should prompt you to make your app public, make it so |
624 | | - |
625 | | -  |
626 | | - |
627 | | - - Go to the **Remote explorer** tab at the left of the Gitpod editor, you should see the port where your application is running. Click on the **open browser** button |
628 | | - |
629 | | -  |
| 611 | + - Go to the **Remote explorer** tab at the left of the Gitpod editor, you should see the port where your application is running, which is port `9080` in our case. |
| 612 | + Click on the **open browser** button (the globe icon). |
630 | 613 |
|
631 | | - - You should see the swagger-ui window open |
632 | 614 |
|
633 | 615 | === "Locally" |
634 | 616 | - Open a browser to [`http://localhost:9080/swagger-ui.html`](http://localhost:9080/swagger-ui.html) |
|
0 commit comments