create posts gql resolver
move api auth to middleware
use jwt to secure graphql
An application to store and make my micro blog posts (tweets, toots, skeets) from various source available for other personal projects.
Currently supports:
App: Elixir app built with:
I opted out of using Phoenix to keep things small and simple.
Database: internal sqlite
I'm using this project to experiment with Jujutsu version control, following this guide.
Run app locally.
MIX_ENV=dev iex -S mix run --no-halt
iex> MicroBlogRepo.BlueSky.refresh_posts
iex> r(MicroBlogRepo.BlueSky)
iex> recompile
I'm currently hosting my app on fly.io. I like the ease of setup.
fly launch
fly volumes create micro_blog_db --region ams --size 1
fly deploy
If I'm changing something with how the app runs, I like to first test the container locally with:
$ docker build -t micro_blog_repo:latest .
$ docker run --name micro_blog --rm -p 4001:4001 micro_blog_repo:latest
One of the cool things about Elixir is you can tap into the running program and run functions. Currently the only way to create a user and add credentials is via this workflow.
$local fly ssh console
$remote ./.bin/micro_blog_repo remote
$remote_app
root@xxxxxxxxxxxxxx:/app# ./bin/micro_blog_repo remote
Erlang/OTP 26 [erts-14.2.2] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [jit:ns]
Interactive Elixir (1.16.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(micro_blog_repo@xxxxxxxxxxxxxx)1>
iex(micro_blog_repo@xxxxxxxxxxxxxx)1> MicroBlogRepo.Repo.insert(%MicroBlogRepo.User{username: "bob"})
mix test
This app is built with the following open source software