{{ $product['name'] }}
£{{ number_format($product['price'], 2) }}
You have been here {{ $visits }} times.
Count againThis page is views/about.pvue, served at /about.
``` ## 5. Run it ```bash cd www php -S localhost:3000 ``` Open `http://localhost:3000` (use `localhost`, not `127.0.0.1`). Add `?live` to the URL for hot reload while you edit. Source mode compiles every `.pvue` on each request, so edits show up on refresh. Docker alternative (nginx + php-fpm on port 3000): use the `docker-compose.yaml` and `nginx/default.conf` from the PHPue repository and run `docker compose up`. ## 6. Build and deploy ```bash cd www php index.php build # compiles everything into .dist/ ``` Upload `.dist/`, `assets/`, `httpReqs/`, `index.php`, `conversion.php` and `.htaccess` to any PHP 8 host. `index.php` serves the precompiled `.dist/` automatically. Delete `.dist/` locally when you go back to editing, otherwise the old build keeps being served. Details: [Build and deploy](/docs?topic=build-deploy). ## Next steps - Add server actions without page reloads: [@AJAX](/docs?topic=ajax). - Share data and classes between pages: [backend/ and scope](/docs?topic=backend). - Style with Tailwind: add `tailwindcss` as a dev dependency, set `content` to `["./**/*.pvue", "./**/*.php"]`, build to `assets/css/tailwind-styles.css` and link it in the App header. Rebuild CSS after adding classes. - Complete examples: [Recipes](/docs?topic=recipes). --- # .pvue files: the four blocks > A `.pvue` file is a single-file component with up to four top-level blocks: `£{{ number_format($product['price'], 2) }}