No-bodyq / BRT-System

0 stars 4 forks source link

PHP Backend Project

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.

Features

Getting Started

Prerequisites

Installation

  1. Clone the Repository

    git clone https://github.com/No-bodyq/BRT-System.git
    cd backend
    
  2. Install Composer Dependencies

    composer install
    
  3. Install Dependencies

    composer require vlucas/phpdotenv monolog/monolog
    
  4. Create .env File for Environment Variables

    touch .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
    
  5. Run the Development Server

  php -S localhost:8000 -t public