sagemathinc / cocalc-example-files

Collection of examples to get started with CoCalc
45 stars 35 forks source link

flask example might not work (?) #14

Open williamstein opened 8 years ago

williamstein commented 8 years ago

Moved from https://github.com/sagemathinc/smc/issues/97

Please help me to understand why the following example doesn't work: https://github.com/sagemath/cloud-examples/blob/master/webservice/main.py

Wow, that's broken in many ways, due to it being written years ago and a lot changing since then. I've rewritten it just now so it works:

https://share.cocalc.com/share/df81e09e5b8f16f28b3a2e818dcdd4560e7818ae/support/2015-09-02-090517-webserver/?viewer=share

You should easily be able to use the above to get going with flask development. Note that you have to prepend that "base_url" thing before each url route. There's probably a proper way to do this with

williamstein commented 4 years ago

OK, I updated

https://share.cocalc.com/share/df81e09e5b8f16f28b3a2e818dcdd4560e7818ae/support/2015-09-02-090517-webserver/?viewer=share

again just now.

haraldschilly commented 4 years ago

the documentation points to the wrong file

https://doc.cocalc.com/howto/webserver.html#example-code