4rukadi / kodepos

Home Page:https://kodepos-theta.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@sooluh/kodepos

Requirements

  • Node.js >= 16.20.1
  • Yarn >= 1.22.0

Getting Started

  1. Clone this repository

    git clone https://github.com/sooluh/kodepos.git
  2. Move to the repository directory

    cd kodepos
  3. Install dependencies

    yarn install
  4. Run locally

    • Development mode

      yarn dev
    • Production mode

      1. Build first

        yarn build
      2. Start the app

        yarn start

One-click Deployment

The fastest way to use it privately on PaaS available

Deploy with Vercel Deploy with Koyeb Deploy with Render

Basic Usage

Base URL : http://localhost:3000

Endpoint Description Parameter Method
/search To find postcode using keywords q GET

Example of Use

Request

curl -XGET 'http://localhost:3000/search/?q=danasari'

Response

{
  "statusCode": 200,
  "code": "OK",
  "data": [
    {
      "province": "Jawa Tengah",
      "regency": "Purbalingga",
      "district": "Karangjambu",
      "village": "Danasari",
      "code": "53357"
    },
    {
      "province": "Jawa Tengah",
      "regency": "Tegal",
      "district": "Bojong",
      "village": "Danasari",
      "code": "52465"
    },
    {
      "province": "Jawa Tengah",
      "regency": "Pemalang",
      "district": "Pemalang",
      "village": "Danasari",
      "code": "52314"
    },
    {
      "province": "Jawa Barat",
      "regency": "Ciamis",
      "district": "Cisaga",
      "village": "Danasari",
      "code": "46386"
    }
  ]
}

Showcase

List of awesome projects powered by this API

Ready to use!

List of server APIs ready to use publicly

License

This project is licensed under Apache 2.0 License.

About

https://kodepos-theta.vercel.app

License:Apache License 2.0


Languages

Language:TypeScript 100.0%