Giter VIP home page Giter VIP logo

gamesdbmirror-go's Introduction

GamesDB Mirror API

This is intended to be an easy-to-run solution for mirroring the data served by TheGamesDB.

Getting started

make fetch # NOTE: must be run at least once before running the server
make serve

# test that it works with
#     curl 'http://localhost:5000/Games/ByIds?ids=1'

Running on heroku

One of the primary goals of this project is to be able to run on a free heroku dyno. To that end, things should be pretty drop-in, you just need to:

  1. Create a heroku app
  2. Run make heroku-all APP={name-of-heroku-app}

I like to then run heroku logs -t --app={name-of-heroku-app} to make sure the deploy was successful. You should now be able to hit https://{name-of-heroku-app}.herokuapp.com/Games/ByIds?ids=1 to test.

You can see an example instance running at https://gamesdb-mirror.radreichley.com/Games/ByIds?ids=1

Architecture

Fetcher

Run with

make fetch

The fetcher does the work of pulling the latest GamesDB data dump and massaging/caching it into a form that the server expects. The fetcher is meant to be run often, as it has logic in it that prevents it from doing unnecessary work if no updates are available.

Server

Run with

make serve

The server is a barebones API server that loads the work previously cached by the fetcher into memory and then performs queries against it in reponse to HTTP requests. You can provide a custom bind port by setting the PORT environment variable.

gamesdbmirror-go's People

Contributors

j-swift avatar

Watchers

 avatar  avatar  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.