CRUD API Blog With JWT Auth
To start your Phoenix server:
Run mix setup
to install and setup dependencies
Set database configuration (using postgresql)
username: "postgre_username",
password: "postgre_password",
hostname: "localhost",
database: "database_name",
Run mix ecto.migrate
to run migration database
Start Phoenix endpoint with mix phx.server
or inside IEx with iex -S mix phx.server
Now you can visit localhost:4000
from your browser.
Parameter
Type
Description
username
string
Required
password
string
Required
{
"username" : "your username" ,
"password" : "your password"
}
Parameter
Type
Description
email
string
Required
username
string
Required
password
string
Required
{
"email" : "your email" ,
"username" : "your username" ,
"password" : "your password"
}
Headers
{ "Authorization" : "Bearer token" }
Parameter
Type
Description
title
string
Required
body
string
Required
{
"post" : {
"title" : "your title here" ,
"body" : "your body here"
}
}
Parameter
Type
Description
title
string
Required
body
string
Required
{
"post" : {
"title" : "your title here" ,
"body" : "your body here"
}
}