Pairmotron is an app powered by Phoenix that randomly pairs up users within groups on a weekly basis to work on a project or just write some code!
mix deps.get
export PG_USER="example_username"
export PG_PASSWORD="example_password"
export PG_HOST="localhost"
mix ecto.create && mix ecto.migrate
npm install
mix phoenix.server
Using this model of development allows you to not install anything other than docker.
Now you can visit localhost:4000
from your browser.
Ready to run in production?
Pairmotron uses the ES512 algorithm to generate JSON Web Tokens. You will need to generate a key and set the appropriate environment variables.
To generate a key do the following from the root pairmotron directory:
iex -S mix
iex> JOSE.JWK.generate_key({:ec, "P-521"}) |> JOSE.JWK.to_map
{%{kty: :jose_jwk_kty_ec},
%{"crv" => "P-521",
"d" => "Ae-wdbGhjfpxapevgJDAxaiGHmKYoyWnYDLeAb9jALSBNBzkyelSL-FUHcdFw1B7V2FvPy3YaHEkrVqwPwBwNvLP",
"kty" => "EC",
"x" => "AWFw34kJJaT8Lwew8IG4LcDDr8sMcURn4PhUWMBiMW5vGGonteVvZQAVdW652GFOY9z1nlhymKYXBwNy3PHlz9Z_",
"y" => "APLY5Rww4oI1fhUI7JrIkmHPymzgpGOKsNXHhxoMJDycdoQPWfaimoOX-afOHoJiGWwh2m_EbTSC-4lC4Cz0uzPk"}}
And then set the following environment variables: