Skip to content

About

Ankasa-api is an API that allows users to read flight information data from a database. Ankasa-api also allows users to create, update and delete flight information to/from the database.

Topics

Resources

Stars

0 stars

Watchers

2 watching

Forks

Latest commit

 

History

123 Commits

Folders and files

Repository files navigation


license

PRs welcome made with hearth by infinite-bug

Introduction

Ankasa-api is an API that allows users to read flight information data from a database. Ankasa-api also allows users to create, update and delete flight information to/from the database.

Node.js Express.js PostgreSQL body-parser cors dotenv helmet pg xss-clean

Requirements

  1. Node Js
  2. Express JS
  3. Postman
  4. Web Server (ex. localhost)
  5. Code Editor (VS Code, Sublime, Atom, etc)

Getting Started

Node.js

Node.js is a software that designed to develop web-based applications and is written in the syntax of the JavaScript programming language. JavaScript as a programming language that runs on the client / browser side only can be completed by Node.js. With Node.js, JavaScript can also act as a programming language that runs on the server side, such as PHP, Ruby, Perl, and so on.

Node.js can run on Windows, Mac OS X and Linux operating systems without the need for program code changes. Node.js has its own HTTP server library that make it possible to run a web server without using a web server program such as Apache or Nginx.

Express.js

Express.js is one of the most popular web frameworks for Node.js. The complete documentation and its use which is quite easy, can make us develop various products such as web applications or RESTful API.

Installation

  1. Clone or download this repository
  2. Open app's directory in CMD or Terminal.
  3. Type in Terminal npm install to install the required packages.
  4. Make a new file, .env and setup the file. instruction here
  5. Turn on Web Server and PostgreSQL, (Also can be done with third-party tools like XAMPP, WAMP, etc)
  6. Setup the database. instruction here
  7. Open Postman desktop application or Chrome web extension (Install Postman if you haven't yet)
  8. Choose HTTP Method and enter the request URL.(i.e. localhost:4004/recipe)
  9. Check all Endpoints here

Setup .env file

Open .env file on code editor and copy the code below :

# app
APP_NAME = [APP_NAME]
NODE_ENV = [NODE_ENV]
PORT = [APPLICATION_PORT]
API_URL = [BACKEND_URL]
CLIENT_URL = [FRONTEND_URL]

# database
DB_HOST = [DB_HOST]
DB_USER = [DB_USER]
DB_PASSWORD = [DB_PASSWORD]
DB_NAME = [DB_NAME]
DB_PORT = [DB_PORT]

# jwt
JWT_SECRET = [JWT_SECRET]

# google
EMAIL_FROM = [EMAIL_FROM]
EMAIL_USER = [EMAIL_USER]
GOOGLE_CLIENT_ID = [GOOGLE_CLIENT_ID]
GOOGLE_CLIENT_SECRET = [GOOGLE_CLIENT_SECRET]
REDIRECT_URI = [REDIRECT_URI]
GMAIL_REFRESH_TOKEN = [GMAIL_REFRESH_TOKEN]

API Reference

Parameter Type Description
id string Required. Id of item to fetch

Get all user transactions

  GET /userTransactions
Parameter Type Description
search string Required. Your API key
limit number Required. Your API key
sortType string Required. Your API key
page number Required. Your API key

Get all airlines

  GET /airlines
Parameter Type Description
search string Required. Your API key
limit number Required. Your API key
sortType string Required. Your API key
page number Required. Your API key
sortField string Required. Your API key

Get all destination

  GET /destination
Parameter Type Description
limit number Required. Your API key
sortType string Required. Your API key

Front End

Our Team

Andry Pebrianto
Andry Pebrianto
Project Manager | Full Stack Web Developer
Hanifudin Alfauzi
Hanifudin Alfauzi
Full Stack Web Developer
Muhamad Hakam Faza
Muhamad Hakam Faza
Full Stack Web Developer
Ian Pangestu
Ian Pangestu
Full Stack Web Developer
Bagus Dzikri Hidayat
Bagus Dzikri Hidayat
Full Stack Web Developer

License

Distributed under the MIT License.

About

Ankasa-api is an API that allows users to read flight information data from a database. Ankasa-api also allows users to create, update and delete flight information to/from the database.

Topics

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages