Block1A official source repo.
Make sure the following are installed:
- PHP (recommended: PHP 8.x)
- Composer
- Node.js
- A local web server like XAMPP or Laragon
This project is a PHP-based website using Composer for dependency management and Tailwind CSS for styling. The following instructions will guide you through setting up the project on your local machine for development and testing purposes.
-
Clone the repository
git clone https://github.com/jrwnnnn/re-block1a.git cd block1a -
Install
vlucas/phpdotenvThis is needed to manage environment variables:
composer require vlucas/phpdotenv
-
Create a
.envfile in the root directory of the project. It should contain environment-specific variables such as:DB_HOST=localhost DB_NAME=your_database DB_USER=root DB_PASS=
-
Ensure the
.envfile is loaded in your PHP project by including the following in your main file (e.g.,index.phpor a config file):require_once __DIR__ . '/vendor/autoload.php'; $dotenv = Dotenv\Dotenv::createImmutable(__DIR__); $dotenv->load();
-
Install Node dependencies
In the project folder, run the following command in the terminal to install Node dependencies:
npm install
-
Run Tailwind CSS
Compile TailwindCSS by running:
npm run tailwind
-
Start the website
-
Open your local server (e.g., XAMPP, Laragon).
-
Point it to your project folder.
-
Visit the site at:
http://localhost/re-block1a/index.php
-
This project uses the MIT license. For details, please refer to the LICENSE file.