Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
lduboeuf committed Jan 31, 2017
1 parent 9f26f1b commit 496c21f
Showing 1 changed file with 32 additions and 8 deletions.
40 changes: 32 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,47 @@
#simple single-user Slim todo app
##simple single-user Slim todo app

use of REST webservice to create/read/update/delete/ tasks

enabled *CORS* header to make it available within your network.

#install

Prepare your database, see `resources/todo-app.sql` and tune your `src/settings.php`

To run the application in development, you can run this command.
Download dependencies ( need `composer` )

```shell
composer install
```

#run

`composer start`

now browse to `http://localhost:8080/todos_object.html`

##API available
GET http://localhost:8080/api/v1/todos
PUT http://localhost:8080/api/v1/todo/6
DELETE http://localhost:8080/api/v1/todo/6
POST http://localhost:8080/api/v1/todo
##available API

- get all todos:

`GET http://localhost:8080/api/v1/todos`

- get todo with id=6:

`GET http://localhost:8080/api/v1/todos/6`

- update todo with id=6:

`PUT http://localhost:8080/api/v1/todo/6`

- delete todo with id=6:

`DELETE http://localhost:8080/api/v1/todo/6`

- create todo:

`POST http://localhost:8080/api/v1/todo`


Sample mini-js app available at `http://localhost:8080/todos_object.html`


0 comments on commit 496c21f

Please sign in to comment.