Sign inSign up

javier1/todo-app

By javier1

•Updated almost 7 years ago

Image
0

100

javier1/todo-app repository overview

⁠TodoApp

An example todo api using Phauxth authentication⁠ with the Phoenix web framework⁠.

⁠Getting started

  1. Install dependencies:
mix deps.get
  1. Setup database:
mix ecto.setup
  1. Start the app:
iex -S mix phx.server
⁠Using Curl

With Curl, the above example would be:

curl --request POST \
  --url http://localhost:4000/api/sessions \
  --header 'content-type: application/json' \
  --data '{
	"session": {
		"email": "[email protected]",
		"password": "password"
	}
}'

The response will be in the form {"access_token": token}

Then you can access the /users route by running this command (replace token with the value of the token):

curl --request GET \
  --url http://localhost:4000/api/users \
  --header 'content-type: application/json' \
  --header 'Authorization: token' \

Tag summary

Content type

Image

Digest

Size

349.4 MB

Last updated

almost 7 years ago

docker pull javier1/todo-app