This is a simple PHP backend project built without using any framework. It includes basic routing, environment variable management, and logging capabilities. The project structure is organized for easy expansion as the application grows.
- Basic routing for GET and POST requests
- Environment variable management using PHP-Dotenv
- Logging using Monolog
- PHP (>=7.4)
- Composer
-
Clone the Repository
git clone https://github.com/No-bodyq/BRT-System.git cd backend
-
Install Composer Dependencies
composer install
-
Install Dependencies
composer require vlucas/phpdotenv monolog/monolog
-
Create
.env
File for Environment Variablestouch .env
Add environment variables in
.env
:APP_ENV=development DB_HOST=localhost DB_NAME=<databasename> //your database name DB_PORT=<port> //usually 5432 DB_PASSWORD=<dbpassword> //your database password DB_USER="dbuser" //your database username
-
Run the Development Server
php -S localhost:8000 -t public