cocalc-example-files icon indicating copy to clipboard operation
cocalc-example-files copied to clipboard

flask example might not work (?)

Open williamstein opened this issue 8 years ago • 2 comments

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 avatar Sep 23 '16 21:09 williamstein

OK, I updated

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

again just now.

williamstein avatar Jun 27 '20 00:06 williamstein

the documentation points to the wrong file

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

haraldschilly avatar Jun 27 '20 09:06 haraldschilly