Commit d9cdeaa1 authored by Antoine Le Gonidec's avatar Antoine Le Gonidec

Add instructions to setup a local instance

parent fb35887c
# ./play.it API
## Local installation instructions
1. Clone the repository locally
```
git clone https://framagit.org/vv221/play.it-api.git
cd play.it-api
```
2. Install PHP dependencies
```
composer install
```
3. Create and update the configuration file
```
cp .env.example .env
```
Edit the newly created .env, its contents should look like:
```
APP_NAME='./play.it API'
APP_ENV=development
APP_KEY=RYeT8bZlt4Cy4gpvNsepREgi+FJ1o5Gr
APP_DEBUG=true
APP_URL=http://localhost:8000
APP_TIMEZONE=UTC
LOG_CHANNEL=stack
LOG_SLACK_WEBHOOK_URL=
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=database_name
DB_USERNAME=database_user
DB_PASSWORD=database_password
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
```
To generate the app key you can use a command like `openssl rand -base64 24`
4. Create and populate the database
```
./artisan migrate:refresh --seed
```
5. Run a local instance
```
php -S localhost:8000 -t public
```
You can now access the API through http://localhost:8000/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment