Skip to content

API Server for querying administrative regions in Cambodia including Provinces, Districts, Communes and Villages

Notifications You must be signed in to change notification settings

kruyvanna/node-pumi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node Pumi

Node Pumi is an API Server for querying administrative regions in Cambodia including Provinces, Districts, Communes and Villages

The data is forked from the awsome pumi project by dwilkie

How to run

Install dependencies

yarn

Build

yarn build

Start the server

yarn start

Check the server response. In your browser, open this url http://localhost:3002/provinces

http://localhost:3002/provinces

REST APIs

Get all provinces

/provinces

Get districts of a province

/districts/:provinceId

Get communes of a district

/communes/:districtId

Get villages of a commune

/villages/:communeId

Get by Khmer name

/province/nameKm/:name
/district/nameKm/:name
/commune/nameKm/:name
/village/nameKm/:name

Example: http://localhost:3002/province/nameLatin/ភ្នំពេញ

Get by Latin name

/province/nameLatin/:name
/district/nameLatin/:name
/commune/nameLatin/:name
/village/nameLatin/:name

Example: http://localhost:3002/province/nameLatin/Phnom Penh

Develop

The project is written in typescript. To compile and run the code everytime you change the source code type the following command

yarn dev

Run Test

yarn test

About

API Server for querying administrative regions in Cambodia including Provinces, Districts, Communes and Villages

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published