A toy Phoenix application for randomizing user points.
Made with ❤️ by Connor Lay
- Docker
- Docker Compose
- Elixir
- Curl (optional)
- Clone this repository
git clone git@github.com:connorlay/rando.git- Setup the development environment
mix setup- Start the Phoenix server
mix phx.server- (Optional) Run the test suite
mix test- Query the server for the initial state
curl 'localhost:4000'
{
"users": [],
"queried_at": nil
}-
Wait for the server to refresh (every minute, watch the debug logs)
-
Query the server for the new state
curl 'localhost:4000'
{
"users": [
{
"id": 1,
"points": 1
},
{
"id": 2,
"points": 2
}
],
"queried_at": "2021-02-28T04:29:49.918864"
}-
Wait for the server to refresh again
-
Query the server for the new state
curl 'localhost:4000'
{
"users": [
{
"id": 5,
"points": 5
},
{
"id": 6,
"points": 6
}
],
"queried_at": "2021-02-28T04:30:02.053116"
}mix setup: bootstraps the projectmix phx.server: starts the Phoenix servermix ecto.migrate: runs Ecto migrationsmix ecto.reset: resets Ectomix test: runs ExUnit testsmix docker_compose up: starts Docker Composemix docker_compose down: stop Docker Composemix docker_compose drop: resets Docker Compose