API repository for Github.ist
Branch: master
Clone or download
Latest commit 6481f81 Dec 24, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode Moved from old repository Aug 23, 2018
config
lib Move src/ to app root Dec 24, 2018
priv Move src/ to app root Dec 24, 2018
test Move src/ to app root Dec 24, 2018
.credo.exs
.dockerignore Move src/ to app root Dec 24, 2018
.formatter.exs
.gitignore
Dockerfile Move src/ to app root Dec 24, 2018
LICENSE
README.md Dockerize the application Oct 13, 2018
build.sh Move src/ to app root Dec 24, 2018
docker-compose.yml Move src/ to app root Dec 24, 2018
mix Dockerize the application Oct 13, 2018
mix.exs Move src/ to app root Dec 24, 2018
mix.lock Move src/ to app root Dec 24, 2018
run Dockerize the application Oct 13, 2018

README.md

Github.ist API

This is the API repo for https://github.ist. You may also want to take a look to Web and Fetcher

Installation

Before the installation, please provide the seed data via Fetcher. You can find the instructions in the fetcher repo.

Docker

  • Install dependencies with ./mix deps.get
  • Create and migrate your database with ./mix ecto.create && ./mix ecto.migrate
  • Seed the database with ./mix run priv/repo/seeds.exs

Executing Custom Commands

To run commands other than mix tasks, you can use the ./run script.

./run iex -S mix

Traditional Setup

  • Change directory to src with cd src/
  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.create && mix ecto.migrate
  • Seed the database with mix run priv/repo/seeds.exs

Starting the API

You can start the API with mix phx.server command. You can visit http://0.0.0.0:4000 from your browser.

Wıth Docker

You can start the API with docker-compose up. You can check it via curl 'http://localhost:4000/graphql' -H 'content-type: application/json' --data-binary '{"operationName":null,"variables":{"username":"mdegis"},"query":"query ($username: String!) {\n developer(username: $username) {\n ...BasicDeveloper\n bio\n githubUrl\n __typename\n }\n}\n\nfragment BasicDeveloper on Developer {\n id\n name\n username\n avatarUrl\n __typename\n}\n"}'