This is a base template for starting out a Phoenix project with Absinthe, plus authentication.
This is a template that's meant to be used as a starting point for your next Phoenix project, it's a GraphQL API that let you create/login/logout users and also has a tokenRefresh
mutation. It also has a docker-compose.yml
file so you don't have to worry about installing Postgres
locally.
I wouldn't consider this to be production ready because I'm not an expert in Elixir/Phoenix so this template might have some bad patterns and a bunch things that can be improved. That said, if you want to improve this project, feel free to open an issue or pull request.
There's no real reason for this, I had to pick a name for the project and that was the first thing that came to my mind
Phoenix: 1.4.16
Absinthe: 1.4.0
Guardian: 2.0
- For convenience, this project contains a
docker-compose.yml
files that spins up aPostgres
database so you don't have to deal with local installations ofPostgres
. If you want to change the credentials, or use any other DB feel free to updatedocker-compose.yml
or completely ignore it. mix ecto.setup
Will setup the databse, run the necessary migrations and will seed the database with initial datamix phx.server
will start the Phoenix server inlocalhost:4000
- Open
localhost:4000/graphiql
to visit project's GraphiQL
- Me (current user)
- Create an user
- Login
- Logout
- Refresh Token