Skip to content

Commit

Permalink
Update chapter-03.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
nicozanf authored Jun 14, 2024
1 parent 3c2b1d7 commit 7fdd049
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions docs/chapter-03.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -237,7 +236,7 @@ If you installed py4web from pip you can simple upgrade it with

::

py4web setup apps
py4web setup <path to apps_folder>

in order to re-install them. This is a safety precaution, in case you
made changes to those apps.
Expand Down Expand Up @@ -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:

::

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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``.
Expand Down

0 comments on commit 7fdd049

Please sign in to comment.