API/Backend for Misirlou, Ripple's system for managing tournaments
  • Go 52.7%
  • PHP 47.3%
Find a file
2018-04-30 17:57:27 +02:00
classes Change RippleAPI's user-agent 2018-03-04 21:24:19 +01:00
http Add registration to single-player tournaments 2018-04-30 17:57:27 +02:00
methods remove beatmap requests 2018-03-05 19:15:26 +01:00
migrations Remove AUTO_INCREMENT 2018-04-30 10:35:36 +02:00
models Add registration to single-player tournaments 2018-04-30 17:57:27 +02:00
vendor Add OAuth start + finish 2018-04-29 19:30:40 +02:00
.gitignore Vendor dependencies with dep 2018-03-08 22:53:55 +01:00
common_functions.php fixes 2017-08-01 16:40:07 +02:00
composer.json Add sentry 2017-08-01 13:22:30 +02:00
composer.lock Add sentry 2017-08-01 13:22:30 +02:00
config.sample.php web push notifications for register and invites 2017-08-05 16:50:13 +02:00
Gopkg.lock Add OAuth start + finish 2018-04-29 19:30:40 +02:00
Gopkg.toml Add OAuth start + finish 2018-04-29 19:30:40 +02:00
include.php Add sentry 2017-08-01 13:22:30 +02:00
LICENSE bump copyright year 2018-03-05 21:10:53 +01:00
main.go Add OAuth start + finish 2018-04-29 19:30:40 +02:00
README.md Update readme 2018-03-04 20:59:08 +01:00
registration_validation.php Add status RegClosedRequestsOpen, remove temp fixes 2017-08-06 00:01:23 +02:00
router.php Add application/json content type to all responses 2018-03-04 20:39:39 +01:00

Misirlou API

Three tomatoes are walking down the street - a poppa tomato, a momma tomato, and a little baby tomato. Baby tomato starts lagging behind. Poppa tomato gets angry, goes over to the baby tomato, and smooshes him... and says, 'ketchup!'

Misirlou is Ripple's system for managing tournaments. This is the API/backend, and why write it in PHP, you may ask? Because I thought that the thing wouldn't have grown and that writing a few PHP files would have been enough. What a fool!

To get started, simply copy config.sample.php to config.php, and edit the values in $config. Everything should be pretty obvious and need no explanation.

Done that, create/update the database schema by running from the command line migrate.php. Finally, create an nginx config so that all requests are routed to /router.php:

server {
	autoindex on;
	listen 80;
	server_name quarterpounderwithcheese.org;
	root /home/howl/oc/misirlou-api;
	charset utf-8;
	location / {
		try_files $uri $uri/ /router.php;
	}
	include php;
}

(The configuration above is actually not recommended in production - you should at least remove the autoindex.)