Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (23 sloc) 2.5 KB

CircleCI Go Report Card GoDoc MIT License

Flights is a super-simple mileage calculator using the data from OpenFlights.

It serves three components:

  • The main mileage calculator, hosted at / on the http port, which is just a dead simple html page
  • The HTTP API from, hosted at /api on the http port
  • The GRPC API from, hosted at / on the grpc port

By default, the http port is 8080 (mapped to 80 at and, and the grpc port is 7070.

Routes are inputted using freeform strings, as shown by example on the calculator page. Minimum miles and percentage are both integers (100 = 100%).

The primary purpose of this repository has been to test out various libraries I write. Also, I've been a backend guy my whole career, so this has been a way for me to play around with some simple html/javascript/css.

It is hard to find a good, simple mileage calculator, and if you fly a lot, a few miles here and there at the end of the year can make a big difference. I have wanted a good, simple mileage calculator for a while - no bells and whistles, just calculate what I want and be done with it - so I decided to write one.

Next steps are overrides for various airlines. (i.e. United). If you fly a lot, you know that the actual distance in miles is not the only factor in how many award and premier miles you earn. is part of the work in progress for this, but I have no idea when I will have time to finish it.

As with the openflights repository, if you do use this, I ask you to donate to OpenFlights, the source for all the data in here as of now, at Seriously, if you can afford it, the OpenFlights team is responsible for putting all this data together and maintaining it, and we owe it to them to support their work.