A simple Twig server for quick prototyping.
composer install
PHP CLI is required.
Run:
php -S localhost:8888 router.php
For convenience, a start script is included to serve on port 8888
.
./start
(The /start
file should be executable. If not run chmod +x start
.)
The Tailwind CDN script is loaded in
the templates/index.twig
file.
PSR-4 autoload points to the /lib
directory. Add PHP classes there under the namespace TwigServer
.