From 7fdd049e3e05184def868cdb08f3b20bf3ac583e Mon Sep 17 00:00:00 2001 From: Nico Zanferrari Date: Fri, 14 Jun 2024 23:56:04 +0200 Subject: [PATCH] Update chapter-03.rst --- docs/chapter-03.rst | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/docs/chapter-03.rst b/docs/chapter-03.rst index a9daeac..e4167c0 100644 --- a/docs/chapter-03.rst +++ b/docs/chapter-03.rst @@ -210,13 +210,12 @@ Unzip it on a local folder and open a command line there. Finally run :: - py4web-start set_password - py4web-start run apps + ./py4web set_password + ./py4web run apps -With this type of installation, remember to always use **py4web-start** -instead of ‘py4web’ or ‘py4web.py’ in the following documentation. +(omit './' if you're using Windows). -Notice the binaries many not correspond to the latest master +Notice: the binaries many not correspond to the latest master or the latest stable branch of py4web although we do our best to keep them up to date. @@ -237,7 +236,7 @@ If you installed py4web from pip you can simple upgrade it with :: - py4web setup apps + py4web setup in order to re-install them. This is a safety precaution, in case you made changes to those apps. @@ -275,7 +274,7 @@ two apps in this folder: **Dashboard** (``_dashboard``) and **Default** to avoid conflicts with apps created by you. Once py4web is running you can access a specific app at the following -urls: +urls from the local machine: :: @@ -381,7 +380,7 @@ This currently gives an error on binaries installations and from source installa -Y, --yes No prompt, assume yes to questions [default: False] - -H, --host TEXT Host name [default: 127.0.0.1] + -H, --host TEXT Host listening IP [default: 127.0.0.1] -P, --port INTEGER Port number [default: 8000] -A, --app_names TEXT List of apps to run, comma separated (all if omitted or empty) @@ -415,6 +414,10 @@ This currently gives an error on binaries installations and from source installa The ``app_names`` option lets you filter which specific apps you want to serve (comma separated). If absent or empty all the apps in the APPS_FOLDER will be run. +By default (for security reasons) the py4web framework will listen only on 127.0.0.1, i.e. localhost. +If you need to reach it from other machines you must specify the host option, +like ``py4web run --host 0.0.0.0 apps``. + The ``url_prefix`` option is useful for routing at the py4web level. It allows mapping to multiple versions of py4web running on different ports as long as the url_prefix and port match the location. For example ``py4web run --url_prefix=/abracadabra --port 8000 apps``.