In this project, I aim to use clean code principles to build a micro-framework.
This micro-framework is designed to provide a simple, clean, and efficient foundation for building PHP applications. It adheres to clean code principles to ensure maintainability and readability.
Ensure you have PHP installed on your machine.
-
Clone the repository:
git clone https://github.com/yourusername/php_micro_framework.git
-
Navigate into the project directory:
cd php_micro_framework
-
Install dependencies:
If you have any dependencies, install them as needed. This may include Composer for PHP libraries or other tools.
-
Set up environment variables:
Create a
.env
file in the root directory based on.env.example
and configure your settings.
First, make sure to create the index.php
file in the public
directory. This file will serve as the entry point for your application.
To start the built-in PHP server, run:
php -S localhost:8080 -t public
To migrate your tables:
php migrate.php migrate