Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

exp:expstaticserve

Preview the static build of a target locally: PHP's built-in web server serves its folder below the target's base path, as GitHub Pages serves a project site.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/examples/commands/expstaticserve.md

On this page

exp:expstaticserve

Preview the static build of a target locally: PHP's built-in web server serves its folder below the target's base path, as GitHub Pages serves a project site.

Script bin/php/expstaticserve.php, code in kernel/private/classes/commands/expstaticserve.php. Run it from the installation root, as the user the web server runs as:

./console exp:expstaticserve --help
./console exp:static:serve --help
php bin/php/expstaticserve.php --help

Help text

Preview a static build
Serves the target's folder with PHP's built-in web server, below the target's base path (/my-site/)
the way GitHub Pages serves a project site: a folder answers with its index.html, a missing page
with 404.html. Listens on this computer only unless --host says otherwise; stop it with Ctrl+C.

./console exp:static:serve github-public                    http://127.0.0.1:8090/my-site/
./console exp:static:serve github-public --base-path=/      at the root, as with a custom domain
./console exp:static:serve github-public --port=9000

Options

OptionValueHelp
--portrequiredThe port of the preview server (default 8090)
--hostrequiredThe address the preview server listens on (default 127.0.0.1, this computer only)
--base-pathrequiredServe the folder below this path (default the target's BasePath; / for the root)
--formatrequiredtext (default) or json (the machine output exp-static/1)

Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).

Arguments: [target].


Generated by ./console exp:help:examples from bin/php/expstaticserve.php, kernel/private/classes/commands/expstaticserve.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x