An open API service indexing awesome lists of open source software.

https://github.com/freinet12/pet-clicker-api

A simple API using Laravel & Laravel Sanctum for Authentication
https://github.com/freinet12/pet-clicker-api

Last synced: about 1 year ago
JSON representation

A simple API using Laravel & Laravel Sanctum for Authentication

Awesome Lists containing this project

README

          

## Pet Clicker API

#### Project Setup
- Create a .env file and copy everything from .env.example into the .env file
- Create an S3 bucket on AWS and set the following variables in the .env file:

` AWS_ACCESS_KEY_ID={{your aws access key id}}`

` AWS_SECRET_ACCESS_KEY={{your aws access key}}`

` AWS_DEFAULT_REGION={{aws region}}`

` AWS_BUCKET={{S3 bucket name}}`

` AWS_URL={{S3 bucket url}}`


- Run `docker-compose up -d --build`
- Run `docker exec -it pet-clicker-api bash`
- Now inside the container, run `php artisan migrate`

- The app should now be running on `localhost:8084`

#### User Auth Routes
- Registration

- url: `{{app_url}}/api/auth/register`
- required fields:

`name`

`email`

`password`

`password_confirmation`

- Login

- url: `{{app_url}}/api/auth/login
- required fields:

`email`

`password`

- Logout

- url: `{{app_url}}/api/auth/logout`
- required fields: NONE