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
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
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
The project is written in typescript. To compile and run the code everytime you change the source code type the following command
yarn dev
yarn test