Liaison Web Server (old)
A web server typically includes a self-made Liaison package (for themes, views, and routes), a configuration file, environment settings, and a deliver.php
script for setting up your Site's package and any other packages you're using.
See WebServer Documentation for more.
Webserver Directory Structure
This is a sample structure, and you're welcome to use your own.
DOCUMENT_ROOT
- .env/ <- Your environment configs
- .htaccess <- Used by apache to route to your deliver.php
- composer.json
- deliver.php <- Every request is routed through this file
- site/ <- Your primary Liaison package , with your theme & core pages & features.
- public/index.php <- your home page
- packages/ <- Additional packages you develop, to organize different features of your website
- deliver/ <- Optional directory to organize different aspects of your setup
deliver.php
This script sets up your webserver & delivers a response.
<?php
$lia = new \Lia();
// Add the built-in Package, which provides all the web-server features.
$server_package= new \Lia\Package\Server($lia, $fqn='lia:server', ?$dir, ?$base_url); // dir & base_url not required
// Add your package, providing home page & other core pages & features
$site_package = new \Lia\Package\Server($lia, 'myname:site', __DIR__.'/site/');
// delivers files in `site/public/*`
$lia->deliver();
See the WebServer Documentation for configuring your database, handling static files, file uploads, debugging, documentation, and other features.