Skip to content

Commit

Permalink
(apache#5489) Docs index - how it works
Browse files Browse the repository at this point in the history
  • Loading branch information
tdiesler committed May 10, 2024
1 parent 5380b4f commit 5a8894d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
3 changes: 2 additions & 1 deletion docs/local-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
# limitations under the License.
#

CW=./../../camel-website
SCRIPT_DIR=$(dirname $0)
CW=${SCRIPT_DIR}/../../camel-website
LOCAL=./../camel-k

cd $CW || (echo 'camel-website not in expected location $CW' && exit)
Expand Down
19 changes: 12 additions & 7 deletions docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,23 @@ Users of Camel K can instantly run integration code written in Camel DSL on thei
[[how-it-works]]
== How It Works

Just write a _helloworld.groovy_ integration file with the following content:

```groovy
from('timer:tick?period=3000')
.setBody().constant('Hello world from Camel K')
.to('log:info')
Just write a _helloworld.yaml_ integration file with the following content:

```yaml
- from:
uri: "timer:yaml"
parameters:
period: "3000"
steps:
- setBody:
simple: "Hello world from Camel K"
- to: "log:info"
```

You can then execute the following command:

```
kamel run helloworld.groovy
kamel run helloworld.yaml
```

The integration code immediately runs in the cloud. **Nothing else** is needed.
Expand Down

0 comments on commit 5a8894d

Please sign in to comment.