Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.
/ slim-todo-app Public archive

minimum sample todo app with web services written with Slim php Framework

Notifications You must be signed in to change notification settings

afpa-mx2016/slim-todo-app

Repository files navigation

##simple single-user Slim todo app

example definition of REST webservice to create/read/update/delete/ tasks

added CORS header to make it available within your network.

use (Slim)[https://www.slimframework.com/] as php Framework

#install

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

Download dependencies ( need composer )

composer install

#run

composer start

##available API

  • get all todos:
curl http://localhost:8080/api/v1/todos
  • get todo with id=6:
curl http://localhost:8080/api/v1/todos/6
  • update todo with id=6:
curl -XPUT -d '{"task":"my task", "priority":1}' http://localhost:8080/api/v1/todos/6
  • delete todo with id=6:
curl -XDELETE  http://localhost:8080/api/v1/todos/6
  • create todo:
curl -XPOST -d '{"task":"my task", "priority":1}' http://localhost:8080/api/v1/todos

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

About

minimum sample todo app with web services written with Slim php Framework

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published