Giter Site home page Giter Site logo

nest-airports's Introduction

International Airport Data API

This project utilizes NestJS to provide an API for accessing international airport data sourced from OurAirports.

Features

  • Retrieves international airport data including name, location, country, and other relevant information.
  • Provides endpoints for querying airports based on various parameters such as country, type, and location.

Prerequisites

Before running this application, ensure you have the following installed:

  • Node.js
  • npm (Node Package Manager)
  • MySQL server

Getting Started

  1. Clone this repository to your local machine:
git clone https://github.com/DyanGalih/nest-airports.git
  1. Navigate into the project directory:
cd nest-airports
  1. Install dependencies:
npm install
  1. Set up environment variables:

Create a .env file in the root directory and add the following environment variables:

DB_HOST=your_mysql_host
DB_PORT=your_mysql_port
DB_USER=your_mysql_username
DB_PASSWORD=your_mysql_password
DB_DATABASE=your_mysql_database
PORT=3000

Replace your_mysql_host, your_mysql_port, your_mysql_username, your_mysql_password, and your_mysql_database with your MySQL database connection details.

  1. Start the server:
npm start

The server will start running on port 3000 by default. You can change the port by modifying the PORT environment variable in the .env file.

  1. Access the API:

You can now access the API at http://localhost:3000.

Deployment

Follow these steps to deploy the repository to your personal server:

  1. Ensure your server meets the prerequisites mentioned above.

  2. SSH into your server.

  3. Clone the repository onto your server:

git clone https://github.com/DyanGalih/nest-airports.git
  1. Navigate into the project directory:
cd nest-airports
  1. Install dependencies:
npm install --production
  1. Set up environment variables:

Create a .env file in the root directory and add the following environment variables:

DB_HOST=your_mysql_host
DB_PORT=your_mysql_port
DB_USER=your_mysql_username
DB_PASSWORD=your_mysql_password
DB_DATABASE=your_mysql_database
PORT=3000

Replace your_mysql_host, your_mysql_port, your_mysql_username, your_mysql_password, and your_mysql_database with your MySQL database connection details.

  1. Build the project:
npm run build
  1. Start the server:
npm run start:prod

Your API should now be deployed and accessible on your personal server.

API Documentation

You can find the API documentation here.

License

This project is licensed under the MIT License - see the LICENSE file for details.

nest-airports's People

Contributors

dyangalih avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.