From 97f55cf84d6628ac11a66850043ca0304212de84 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Wed, 19 Jun 2024 14:25:15 +0100 Subject: [PATCH] Update README.md --- README.md | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 455eef9..c2b068e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,32 @@ # textual-serve -Textual-serve turns your [Textual](https://github.com/textualize/textual) app in to a web application. +Every [Textual](https://github.com/textualize/textual) application in now a web application. +With 3 lines of code, any Textual app can run in the browser. + + + + + + + + + + + + + +
+

This is Posting running in the terminal.

+
+ +
+

This is Posting running in the browser.

+
+ +
+ +--- ## Getting Started @@ -16,13 +41,13 @@ pip install textual-serve ## Creating a server -The API is super simple. First import the Server class: +First import the Server class: ```python from textual_serve.server import Server ``` -Then create a server instance and pass the command that launches your Textual app: +Then create a `Server` instance and pass the command that launches your Textual app: ```python server = Server("python -m textual") @@ -30,7 +55,7 @@ server = Server("python -m textual") The command can be anything you would enter in the shell, as long as it results in a Textual app running. -Finally, call the `serve` command: +Finally, call the `serve` method: ```python server.server()