Skip to content

Commit 3b63214

Browse files
crazyengjfultz
authored andcommitted
adding a meaningful API
1 parent 928fc78 commit 3b63214

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ mkdir testapp/form
118118
mkdir testapp/api
119119
echo 'ExportForm[{"hello", UnixTime[]}, "JSON"]' > testapp/index.wl
120120
echo 'FormFunction["x" -> "String"]' > testapp/form/index.wl
121-
echo 'APIFunction["x" -> "String"]' > testapp/api/index.wl
122-
echo 'HTTPResponse["hello world"]' > testapp/api/response.wl
121+
echo 'APIFunction["x" -> "Number", #x! &]' > testapp/api/index.wl
122+
echo 'HTTPResponse["hello world"]' > testapp/response.wl
123123
echo '["some", "static", "JSON"]' > testapp/static.json
124124
```
125125

@@ -140,7 +140,8 @@ Then open the browser at the following locations:
140140
```
141141
http://localhost:18000/
142142
http://localhost:18000/form
143-
http://localhost:18000/api
143+
http://localhost:18000/api?x=4
144+
http://localhost:18000/response.wl
144145
http://localhost:18000/static.json
145146
```
146147

0 commit comments

Comments
 (0)