set up for Api with two endpoints#197
Conversation
|
Nice work, Blessing. We can make this PR to be even "slimmer". I will comment on files that I think are not needed for this task and you should be able to delete those |
| @@ -0,0 +1 @@ | |||
| json_path: coveralls-upload.json | |||
There was a problem hiding this comment.
this task is not focused on continuous integration, so this file can go
| @@ -0,0 +1,24 @@ | |||
| language: php | |||
There was a problem hiding this comment.
this task is not focused on continuous integration, so this file can go
| @@ -0,0 +1,14 @@ | |||
| # How to Contribute | |||
There was a problem hiding this comment.
please remove this as you are the sole contributor on this project
| @@ -0,0 +1,3 @@ | |||
| http://localhost:8888/welcome/ #Home endpoint | |||
There was a problem hiding this comment.
Good job adding this! Also add the expected http method for each endpoint, and sample requests
| return function (ContainerBuilder $containerBuilder) { | ||
| // Here we map our UserRepository interface to its in memory implementation | ||
| $containerBuilder->addDefinitions([ | ||
| UserRepository::class => \DI\autowire(InMemoryUserRepository::class), |
There was a problem hiding this comment.
we'll be removing all User related files and their references
| @@ -0,0 +1,88 @@ | |||
| <?php | |||
| @@ -0,0 +1,11 @@ | |||
| <?php | |||
| @@ -0,0 +1,19 @@ | |||
| <?php | |||
| @@ -0,0 +1,40 @@ | |||
| <?php | |||
There was a problem hiding this comment.
Everything in tests folder actually should go. Unless you wrote tests for your api?
| @@ -0,0 +1,52 @@ | |||
| <?php | |||
Intoduction to slim php task
I created a database.sql file to query my database and embedded as part of my slim Api
I created two endpoints for the api, one for adding products, the other for listing products
I also added a readme to show the endpoints for the api