From 600ba52599143de95458847224706193e1bb3427 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Wed, 16 Oct 2024 08:47:23 +0100 Subject: [PATCH 1/2] Cleanup of graceful shutdowns --- nbs/tutorials/jupyter_and_fasthtml.ipynb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nbs/tutorials/jupyter_and_fasthtml.ipynb b/nbs/tutorials/jupyter_and_fasthtml.ipynb index 2fd972cc..04a61ba9 100644 --- a/nbs/tutorials/jupyter_and_fasthtml.ipynb +++ b/nbs/tutorials/jupyter_and_fasthtml.ipynb @@ -135,12 +135,20 @@ "def click(): return P('You clicked me!')" ] }, + { + "cell_type": "markdown", + "id": "b231b0b0", + "metadata": {}, + "source": [ + "## Graceful shutdowns" + ] + }, { "cell_type": "markdown", "id": "86554c9d", "metadata": {}, "source": [ - "When you want to gracefully shut down the server use the `server.stop()` function displayed below. If you restart Jupyter without calling this line the thread may not be released and the `HTMX` callable above may throw errors. If that happens, a quick temporary fix is to change the `port` number above to something else.\n", + "Use the `server.stop()` function displayed below. If you restart Jupyter without calling this line the thread may not be released and the `HTMX` callable above may throw errors. If that happens, a quick temporary fix is to change the port number above to something else.\n", "\n", "Cleaner solutions to the dangling thread are to kill the dangling thread (dependant on each operating system) or restart the computer." ] From f01e114ac5066e9bf57ed81821d07872a73fea36 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Wed, 16 Oct 2024 08:53:18 +0100 Subject: [PATCH 2/2] Add segment on full screen view --- nbs/tutorials/jupyter_and_fasthtml.ipynb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/nbs/tutorials/jupyter_and_fasthtml.ipynb b/nbs/tutorials/jupyter_and_fasthtml.ipynb index 04a61ba9..70dbfb29 100644 --- a/nbs/tutorials/jupyter_and_fasthtml.ipynb +++ b/nbs/tutorials/jupyter_and_fasthtml.ipynb @@ -135,6 +135,22 @@ "def click(): return P('You clicked me!')" ] }, + { + "cell_type": "markdown", + "id": "72fc8a55", + "metadata": {}, + "source": [ + "## Full screen view" + ] + }, + { + "cell_type": "markdown", + "id": "4cb6bb90", + "metadata": {}, + "source": [ + "You can view your app outside of Jupyter by going to `localhost:PORT`, where `PORT` is usually the default 8000, so in most cases just click [this link](localhost:8000/)." + ] + }, { "cell_type": "markdown", "id": "b231b0b0",