This project is a RESTful API developed in PHP and hosted on a WAMP server. The API interacts with a MySQL database. Sensitive configuration, such as database connection information, is securely managed using configuration files ignored by Git.
- WAMP (Windows, Apache, MySQL, PHP)
- Composer (for PHP dependency management)
Clone the repository into your desired directory:
git clone https://github.com/DWWM-23526/Projet-passion-mangAPI.git
cd Projet-passion-mangAPI
Make sure Composer is installed, then run the following command to install project dependencies:
composer install
Create a db.config.php file in the config directory with the following content:
<?php
return [
'database' => [
'host' => 'votre_hote',
'port' => votre_port,
'db' => 'votre_nom_de_bdd',
'user' => 'votre_utilisateur',
'pass' => 'votre_mot_de_passe',
'charset' => 'utf8mb4',
'collate' => 'utf8mb4_general_ci',
]
];
Note: This file is added to .gitignore for security reasons. Make sure not to include your connection details in your repository.
Also, ensure to create a migration.log file in a log folder at the root of your project.
Create a migration.log file in a log folder at the root of the project.
Add a virtual host configuration in your WAMP server.
MySQL is required.
The database is automatically created when initializing the project, so no additional steps are needed.
Once the WAMP server is configured and running, you can access your API by navigating to http://api.your-project.local in your browser or using a tool like Postman to send HTTP requests.
Thank you for using our REST API in PHP with WAMP.