Installation Guide for Tina4 PHP
Tina4 PHP runs seamlessly on your local machine with an enhanced version of the PHP webserver which simulates a production environment.
Installation with Composer
Composer handles dependencies declaratively, similar to Laravel's composer create-project.
From your project root (create an empty folder if starting fresh):
Install Tina4 PHP:
bashcomposer require tina4stack/tina4phpInitialize the Project:
bashcomposer exec tina4 initialize:runThis sets up the project structure, including folders for routes, templates, and more.
Start the Development Server:
bashcomposer startThis launches a built-in PHP server at
http://localhost:7145with hot-reloading—edit files and refresh the browser to see changes instantly.
Customizing the Setup
- Change Port: Edit
composer.jsonunder thescriptssection to modify the default port (e.g., replace7145with your preferred port). - Existing Projects: Tina4 packages can integrate into non-Tina4 apps without the full framework—add specific modules via Composer.
Verification
Open http://localhost:7145/ in your browser. You'll see a welcome page or initialization prompt. Add routes in the generated files to test—changes apply immediately, echoing Laravel's artisan serve with live reload.
For production, deploy to a web server; Tina4 supports easy integration with Apache, Nginx, or containers. If issues occur, verify Composer/PHP versions with composer --version and php -v.
This minimal setup gets you coding fast, embodying Tina4's "not a framework" philosophy. Explore Basic Routing for routing examples.