- Node.js
>= 20.x
- npm
-
Clone this repository
git clone https://github.com/sooluh/kodepos.git
-
Move to the repository directory
cd kodepos
-
Install dependencies
npm ci
-
Run locally
-
Development mode
npm run dev
-
Production mode
-
Build first
npm run build
-
Start the app
npm run start
-
-
The fastest way to use it privately on PaaS available
[ENDPOINT] /search
[GET] http://localhost:3000/search/?q=danasari
Params | Description | Required |
---|---|---|
q | Search keywords | โ |
{
"statusCode": 200,
"code": "OK",
"data": [
{
"code": 46386,
"village": "Danasari",
"district": "Cisaga",
"regency": "Ciamis",
"province": "Jawa Barat",
"latitude": -7.3271342,
"longitude": 108.4577572,
"elevation": 110,
"timezone": "WIB"
},
{
"code": 53357,
"village": "Danasari",
"district": "Karangjambu",
"regency": "Purbalingga",
"province": "Jawa Tengah",
"latitude": -7.1857161,
"longitude": 109.4368274,
"elevation": 705,
"timezone": "WIB"
},
{
"code": 52314,
"village": "Danasari",
"district": "Pemalang",
"regency": "Pemalang",
"province": "Jawa Tengah",
"latitude": -6.8649882,
"longitude": 109.3956117,
"elevation": 6,
"timezone": "WIB"
},
{
"code": 52465,
"village": "Danasari",
"district": "Bojong",
"regency": "Tegal",
"province": "Jawa Tengah",
"latitude": -7.1153626,
"longitude": 109.1850778,
"elevation": 737,
"timezone": "WIB"
}
]
}
[ENDPOINT] /detect
[GET] http://localhost:3000/detect/?latitude=-6.547052&longitude=107.3980201
Params | Description | Required |
---|---|---|
latitude | Location latitude | โ |
longitude | Location longitude | โ |
{
"statusCode": 200,
"code": "OK",
"data": {
"code": 41152,
"village": "Kembangkuning",
"district": "Jatiluhur",
"regency": "Purwakarta",
"province": "Jawa Barat",
"latitude": -6.5495591,
"longitude": 107.4121855,
"elevation": 112,
"timezone": "WIB",
"distance": 1.5894826841413479
}
}
List of awesome projects powered by this API
-
kodepos-web
Simple web-app for postcode search by dotslashf -
Kode POS
Indonesia postal code search application (kotlin) by AzharRivaldi
List of server APIs ready to use publicly
Important
For production usage, we recommend deploying it on your own and not using the list below. The list below can be used for development or learning purposes only!
- https://kodepos.vercel.app
latest
- https://kodepos.onrender.com
latest
This project is licensed under Apache 2.0 License.