- Initial Phoenix project
- Keep GitHub API Key in a environment variable and read it from mix config.
- Create separate module called
github_apito interact with GitHub API - Connect to Github API using GraphQL
- Domain modeling using structs
- Paginate results retrieved from API
- Provide a way to test
github_apiwithout hitting the actual github api. (use this: https://medium.com/flatiron-labs/elixir-test-mocking-with-mox-b825a955143f) - Create a page for taking a github username and display a list of watching repos
- Each retrieved repo should redirect to its github location
- Bonus: Display starred repos
- Bonus: Display more info about the user
- Bonus: Deploy to Heroku
Make sure you set the following environment variable in yous sytem: GITHUB_WATCHING_KEY. Its value must be the github api key with appropiate scopes
To start your Phoenix server:
- Install dependencies with
mix deps.get - Install Node.js dependencies with
cd assets && npm install - Start Phoenix endpoint with
mix phx.server
Now you can visit localhost:4000 from your browser.
Run:
mix test
Go here: https://polar-ravine-36455.herokuapp.com/
The following is the list of problems I've found developing this:
- I still struggle creating specs. I don't understand some error that ElixirLS Dialyzer throws. I don't know if it's my code or VSCode tooling.
- I learned how to mock modules for testing. It was easier than I thought using
mox