Just return the current Airport information
Copy .env.example
to .env
and update your environment variables.
Note: You need provides your IP geolocation service provider: check the APP_DETECT_PROVIDER
variable and more advance in Tech stack
section
$ yarn install
$ adonis serve --dev
You can deploy with Docker container or manually
$ yarn install
$ yarn start
$ docker run --restart=unless-stopped -p 3333:3333 -d docker.pkg.github.com/12bay/airport-detection/airport-detection
$ curl https://ap.12bay.dev
{
"name": "Tan Son Nhat International Airport",
"city": "Ho Chi Minh City",
"country": "Vietnam",
"iata": "SGN",
"icao": "VVTS",
"latitude": "10.8187999725",
"longitude": "106.652000427",
"altitude": "33",
"timezone": "7",
"dst": "U",
"tz_name": "Asia/Saigon"
}
$ curl https://ap.12bay.dev/13.2011066/108.7849624
{
"name": "Dong Tac Airport",
"city": "Tuy Hoa",
"country": "Vietnam",
"iata": "TBB",
"icao": "VVTH",
"latitude": "13.049599647500001",
"longitude": "109.333999634",
"altitude": "20",
"timezone": "7",
"dst": "U",
"tz_name": "Asia/Saigon"
}
$ curl https://ap.12bay.dev/debug
{
"ip": "27.71.207.174",
"latitude": 10.8142,
"longitude": 106.6438,
"city": "Ho Chi Minh",
"country": "Vietnam",
"ips": []
}
- Adonis Framework
- flexsearch
- Airports data: https://github.com/timrogers/airports/tree/master/data
- IP geolocation service providers: ip-api.com, ipinfo.io, ipdata.co, ipgeolocation.io or any
MIT © Nghiep