You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,8 @@ Install the library in your site-package directory:
38
38
>>> pip3 install .
39
39
```
40
40
41
+
The following method is not installing the library globally, therefore all the example commands needs to run from the cloned directory.
42
+
41
43
### Start a demo server
42
44
43
45
Start a demo server by doing:
@@ -61,7 +63,7 @@ Now you can open your web browser at the address http://localhost:18000/
61
63
1. Use a single file with URLDispatcher
62
64
2. Use multiple files in a directory layout
63
65
64
-
## Single file with URLDispatcher
66
+
###Single file with URLDispatcher
65
67
66
68
One way to run your server is to direct all requests to a single file
67
69
that runs a Wolfram Language [URLDispatcher](https://reference.wolfram.com/language/ref/URLDispatcher.html) function.
@@ -98,7 +100,7 @@ http://localhost:18000/api
98
100
99
101
For more information about `URLDispatcher` please refer to the [online documentation](https://reference.wolfram.com/language/ref/URLDispatcher.html).
100
102
101
-
## Multiple files in a directory layout
103
+
###Multiple files in a directory layout
102
104
103
105
Another way to write an application is to create a directory structure that is served by the server. The url for each file will match the file's directory path.
@@ -138,14 +140,15 @@ Then open the browser at the following locations:
138
140
```
139
141
http://localhost:18000/
140
142
http://localhost:18000/form
141
-
http://localhost:18000/api
143
+
http://localhost:18000/api?x=4
144
+
http://localhost:18000/response.wl
142
145
http://localhost:18000/static.json
143
146
```
144
147
145
148
One advantage of a multi-file application structure is that is very easy to extend the application. You can simply place new files into the appropriate location in your application directory and they will automatically be served.
0 commit comments