mix deps.get
mix deps.compile
mix ecto.create
mix phx.server
curl -X POST \
http://localhost:4000/api/format \
-H 'Content-Type: application/json' \
-H 'Postman-Token: 3580dc5d-7ffd-40c9-ba5f-7d89c407787a' \
-H 'cache-control: no-cache' \
-d '{"0":
[{"id": 10,
"title": "House",
"level": 0,
"children": [],
"parent_id": null}],
"1":
[{"id": 12,
"title": "Red Roof",
"level": 1,
"children": [],
"parent_id": 10},
{"id": 18,
"title": "Blue Roof",
"level": 1,
"children": [],
"parent_id": 10},
{"id": 13,
"title": "Wall",
"level": 1,
"children": [],
"parent_id": 10}],
"2":
[{"id": 17,
"title": "Blue Window",
"level": 2,
"children": [],
"parent_id": 12},
{"id": 16,
"title": "Door",
"level": 2,
"children": [],
"parent_id": 13},
{"id": 15,
"title": "Red Window",
"level": 2,
"children": [],
"parent_id": 12}]}'
Open http://localhost:4000/github/1
MIX_ENV=test mix deps.get
mix test
To start your Phoenix server:
- Install dependencies with
mix deps.get
- Create and migrate your database with
mix ecto.setup
- Start Phoenix endpoint with
mix phx.server
Now you can visit localhost:4000
from your browser.
Ready to run in production? Please check our deployment guides.
- Official website: http://www.phoenixframework.org/
- Guides: https://hexdocs.pm/phoenix/overview.html
- Docs: https://hexdocs.pm/phoenix
- Mailing list: http://groups.google.com/group/phoenix-talk
- Source: https://github.com/phoenixframework/phoenix