- Docker needs to be installed.
- Postman is needed for api endpoints testing.
-
Clone this repo:
git clone git@github.com:edgarmluzardoc/laravel-todo-api.git -
Go to the root directory of the repo you just cloned.
-
Update your vendor files. Run:
composer update -
Run Docker compose:
docker-compose up -d -
Run database migration:
php artisan migrate -
Run database seeder:
php artisan db:seedNOTE: Because this project is dockerised, the previous command will set up the database so a sql dump is not needed. However, find a example sql file here: https://github.com/edgarmluzardoc/laravel-todo-api/blob/master/doc/mig_db_2019-06-04.sql
-
Go to: http://localhost:8080/
-
You are all set! You should see the default Lavarel welcome page.
-
Run the following on Postman:
NOTE: Find an example collection (you can import it into Postman) for all endpoints here: https://github.com/edgarmluzardoc/laravel-todo-api/blob/master/doc/Todo%20API.postman_collection.json
- Database:
mig_db - Host:
127.0.0.1 - Username:
root - Password:
secret - Port:
33063
For POST endpoint, the params can be passed as a payload in body in json format.
