Skip to content

berrunder/kicker-api

Repository files navigation

kicker-api

Simple REST API for database of kicker (foosball) games

Installation

  1. Install Go;
  2. (Optional) Run docker container for mysql database with docker-compose up;
  3. Set database credentials for your environment in dbconfig.yaml;
  4. Install sql-migrate tool:
go get github.com/rubenv/sql-migrate/...
  1. Run migrations on database (for production use -env=production flag):
sql-migrate up
  1. Build with go build in kicker-api directory.

Usage

kicker-api [--port value] [--datasource value] [--dialect value]

Where --port is webserver port (4000 by default), --datasource is database connection string (by default DSN from dbconfig.yaml is used), --dialect is database dialect ("mysql" by default, can be any dialect supported by sqlx). KICKER_ENV environment variable is used for choosing database config from dbconfig.yaml ("development" by default).

About

Simple REST API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published