Giter VIP home page Giter VIP logo

githubservice's Introduction

GithubService

This application is a mirror for the service https://api.github.com/users/HackerYou. The mirro was created to act as a data cache because there is a limited number of hits you can make to the real api in a 24 hour period.

Each time the mirror is hit, the results are persisted in a database.

The application is deployed on heroku: https://github-api-mirror.herokuapp.com

Supported Queries

To query for user details:

https://github-api-mirror.herokuapp.com/users/

To query for the repositories of a given user:

https://github-api-mirror.herokuapp.com/users//repos

To query for the languages used in a particular repository:

https://github-api-mirror.herokuapp.com/repos///languages

To experiment, try using username = hackeryou and repo-name = amazon

Running the app locally

You need to have Elixir installed, and postgres

Clone the repository

git clone [email protected]:gemcfadyen/GithubService.git

Navigate to the root directory

cd github_service

Install dependencies

mix deps.get

Compile the code

mix compile

Build the database (dev env)

mix ecto.create mix ecto.migrate

Build the database (test env)

MIX_ENV=test mix ecto.create MIX_ENV=test mix ecto.migrate

Run the tests (including integration tests)

mix test

Run the tests (excluding integration tests)

mix test --exclude integration

Start the server locally

mix phoenix.server

Navigate to a supported url

https://localhost:4000/repos///languages

Deploying the app to Heroku

Build the database

heroku run "POOL_SIZE=2 mix ecto.migrate"

Push master to heroku

git push heroku master

Migrate the database

heroku run "mix ecto.migrate"

To connect to the heroku database

heroku pg:psql

To view the heroku logs

heroku logs --tail

To view the heroku database logs

heroku logs --tail --ps heroku-postgres

githubservice's People

Contributors

gemcfadyen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.