Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timrogers/iata-code-decoder-api
A simple API, written in Node.js with the Express framework, which allows you to identify airports, airlines and aircraft by their IATA code
https://github.com/timrogers/iata-code-decoder-api
Last synced: 13 days ago
JSON representation
A simple API, written in Node.js with the Express framework, which allows you to identify airports, airlines and aircraft by their IATA code
- Host: GitHub
- URL: https://github.com/timrogers/iata-code-decoder-api
- Owner: timrogers
- License: mit
- Created: 2022-03-18T17:49:13.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-30T05:30:51.000Z (2 months ago)
- Last Synced: 2024-10-30T06:13:54.284Z (2 months ago)
- Language: TypeScript
- Homepage: https://iata-code-decoder-api.timrogers.co.uk/
- Size: 38.5 MB
- Stars: 11
- Watchers: 4
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# IATA Code Decoder API
A simple API, written in Node.js with the Express framework, which allows you to identify airports, airlines and aircraft by their IATA code.
This is used by my [IATA Code Decoder extension](https://github.com/timrogers/raycast-iata-code-decoder) for [Raycast](https://raycast.com).
The data in the API is cached version of the airport, airline and aircraft data from the [Duffel](https://duffel.com) API. We use a cached copy for speed because the Duffel API does not allow you to view all records in one response - you can only see up to 200 at a time.
The cached data is updated regularly thanks to the power of GitHub Actions 👼
## Usage
## Running locally with Node
1. Make sure you're running Node.js v18 (v18.7.0 is recommended).
2. Install the dependencies by running `npm install`.
3. Start the application by running `npm run dev`. You'll see a message once the app is ready to go.
4. Hit in your browser. You'll see information about Heathrow airport 🥳### Updating cached data
The cached data is updated regularly and committed to the repository thanks to the power of GitHub Actions. You can also do this locally yourself.
1. Make sure you're running Node.js v18 (v18.7.0 is recommended).
2. Install the dependencies by running `npm install`.
3. Set your Duffel access token. Make a copy of the example `.env` file with `cp .env.example .env`, and then edit the resulting `.env` file.
4. Run `npm run generate-airports && rpm run generate-airlines && npm run generate-aircraft`. Commit the result.## Running locally wih Docker
1. Build the Docker image with `docker build . -t timrogers/iata-code-decoder-api`
2. Start a container using your built Docker image by running `docker run -d -p 4000:4000 timrogers/iata-code-decoder-api`
3. Hit in your browser. You'll see information about Heathrow airport 🥳
4. To stop your container - because you're done or because you want to rebuild from step 1, run `docker kill` with the container ID returned from `docker run`.