Skip to content

Commit

Permalink
PR review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Meldiron committed Jan 23, 2023
1 parent a14e7b8 commit 16ed32d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions java/generate_invoice/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# πŸ’» Get Short URL
# πŸ’» Generate invoice

A Java Cloud Function for generating invoice.

Expand Down Expand Up @@ -34,7 +34,7 @@ _Error Example output:_

## πŸ“ Environment Variables

List of environment variables used by this cloud function.
This function does not require any variables.

## πŸš€ Deployment

Expand All @@ -58,6 +58,12 @@ docker run -p 3000:3000 -e INTERNAL_RUNTIME_KEY=secret-key --rm --interactive --

Your function is now listening on port `3000`, and you can execute it by sending `POST` request with appropriate authorization headers. To learn more about runtime, you can visit Java runtime [README](https://github.com/open-runtimes/open-runtimes/tree/main/runtimes/java-18.0).

4. Execute function:

```
curl http:https://localhost:3000/ -d '{"payload":"{\"currency\":\"EUR\",\"items\":[{\"name\":\"Web development\",\"price\":15}],\"issuer\":\"Some\nIssuer\",\"customer\":\"Some\nCustomer\",\"vat\":21}"}' -H "X-Internal-Challenge: secret-key" -H "Content-Type: application/json"
```

## πŸ“ Notes
- This function is designed for use with Appwrite Cloud Functions. You can learn more about it in [Appwrite docs](https://appwrite.io/docs/functions).
- This example is compatible with Java 18.0. Other versions may work but are not guarenteed to work as they haven't been tested.

0 comments on commit 16ed32d

Please sign in to comment.