@@ -15,26 +15,32 @@ This is a demo Toga app implementing a Fahrenheit to Celsius converter.
15
15
16
16
### Development details
17
17
18
- This demo bakes a pre-compiled version of pyscript into the ` server/pyscript `
19
- directory.
18
+ This demo symbolically links the pyscript build generated by the npm server
19
+ (` ../build ` ) into the ` ./static/pyscript ` directory. This symbolic link should
20
+ be restored automatically by git. This also means you'll need to run the main
21
+ pyscript demos at least once before running the server-rendered version of the
22
+ app. If you experience problems loading pyscript, check whether this link
23
+ exists, and the ` build/pyscript.js ` file has been compiled.
20
24
21
- It also includes an experimental version of toga-core, toga-web and toga-flask,
22
- packaged as wheels in the ` server/wheels ` directory.
23
-
24
- If any changes are made to the Toga sources or to PyScript, these vendored
25
- resources will need to be updated.
25
+ It also includes an vendored experimental version of toga-core, toga-web and
26
+ toga-flask, packaged as wheels in the ` ./static/wheels ` directory. If any changes
27
+ are made to the Toga sources, these vendored resources will need to be updated.
26
28
27
29
## Web app
28
30
29
- The web app is a demo Flask server, serving a web app version of Toga at the
30
- root URL. To run the web demo server:
31
+ This app can be viewed as a Single Page App (SPA); this version of the app is
32
+ linked from the main PyScript demo pages.
33
+
34
+ It can also be viewed as a server-rendered app. This version of the app is
35
+ delivered by a demo Flask server, serving a version of app at the root URL. To
36
+ run the web demo server:
31
37
32
38
$ cd server
33
39
$ PYTHONPATH=../freedom/src python -m demo
34
40
35
41
then point your browser at http://localhost:8081/
36
42
37
- Enter a value in the "farenheit " input, and click the "calculate" button.
43
+ Enter a value in the "Farenheit " input, and click the "calculate" button.
38
44
39
45
It may take a few seconds for this button to become live; look for the
40
46
"Collecting nodes..." entry in the console log.
0 commit comments