No description, website, or topics provided.
PHP Makefile
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
db/migrations
httpdocs
src
.gitignore
.travis.yml
Makefile
README.md
composer.json
phinx-local.php
phinx.yml
phpunit.xml

README.md

Build Status

REST Getting Started

Test it out!

Start a docker container mounting the project inside to support live editing:

make run

In another terminal apply database migrations to your container:

make migrate

Now you can excercise the rest api a little:

$ curl -s localhost:8080/todo | jq .
[]
$ curl -s -X POST localhost:8080/todo -d '{"description": "take out the trash", "status": "new"}' | jq .
{
  "id": "5669d68a8430b",
  "status": "new",
  "description": "take out the trash"
}
$ curl -s localhost:8080/todo/5669d68a8430b | jq .
{
  "id": "5669d68a8430b",
  "status": "new",
  "description": "take out the trash"
}
$ curl -s -X PUT localhost:8080/todo/5669d68a8430b -d '{"description": "take out the trash", "status": "open"}' | jq .
{
  "id": "5669d68a8430b",
  "status": "open",
  "description": "take out the trash"
}
$ curl -s -X POST localhost:8080/todo -d '{"description": "get some milk", "status": "new"}' | jq .
{
  "id": "5669d73c96c8b",
  "status": "new",
  "description": "get some milk"
}
$ curl -s localhost:8080/todo | jq .
[
  {
	"id": "5669d68a8430b",
	"status": "open",
	"description": "take out the trash"
  },
  {
	"id": "5669d73c96c8b",
	"status": "new",
	"description": "get some milk"
  }
]
$ curl -s localhost:8080/todo?status=open | jq .
[
  {
	"id": "5669d68a8430b",
	"status": "open",
	"description": "take out the trash"
  }
]
$ curl -s -X DELETE localhost:8080/todo/5669d68a8430b | jq .
$ curl -s localhost:8080/todo | jq .
[
  {
	"id": "5669d73c96c8b",
	"status": "new",
	"description": "get some milk"
  }
]