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
- Postman
- Web Server (ex. localhost)
- Code Editor (VS Code, Sublime, Atom, etc)
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 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.
- Clone or download this repository
- Open app's directory in CMD or Terminal.
- Type in Terminal
npm installto install the required packages. - Make a new file, .env and setup the file. instruction here
- Turn on Web Server and PostgreSQL, (Also can be done with third-party tools like XAMPP, WAMP, etc)
- Setup the database. instruction here
- Open Postman desktop application or Chrome web extension (Install Postman if you haven't yet)
- Choose HTTP Method and enter the request URL.(i.e. localhost:4004/recipe)
- Check all Endpoints here
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]
| Parameter | Type | Description |
|---|---|---|
id |
string |
Required. Id of item to fetch |
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 /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 /destination| Parameter | Type | Description |
|---|---|---|
limit |
number |
Required. Your API key |
sortType |
string |
Required. Your API key |
Distributed under the MIT License.


