-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpush-changes.html.md.erb
42 lines (29 loc) · 1.3 KB
/
push-changes.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
title: Push Local Changes
owner: Daniel Freitag
---
<strong><%= modified_date %></strong>
In this step you’ll learn how to propagate a local change to the application through to <%= vars.product_short %>. As a simple change, we'll modify the version returned when accessing the root endpoint `/`.
To do this, change the message in the static `Info` variable in the `src/main/java/.../ProductService.class` file' to "I am awesome!".
Now compile/build and test locally:
<pre class="terminal">
$ gradle build
...
$ java -jar build/libs/cf-sample-app-java-1.0.0.jar
</pre>
Visiting your application at <a href="http://localhost:4567" target="_blank">http://localhost:4567</a>, you should receive the following response:
```json
{
"status": "I am awesome!",
"version": "1.0.0",
"appMode": null
}
```
Since you already have compiled and built your latest changes, you only need to push your changes to the app cloud. All you need to do is to execute `cf push` again:
<pre class="terminal">
$ cf push my-java-app -p build/libs/cf-sample-app-java-1.0.0.jar -n my-random-hostname
</pre>
Finally, check that everything is working by visiting your app's URL from your web browser.
<div style="text-align:center;margin:3em;">
<a href="./environment.html" class="btn btn-primary">I can push local changes</a>
</div>