Skip to content

Commit

Permalink
📦 v1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
justinbalaguer committed Nov 24, 2020
1 parent 296d5d4 commit 69112ff
Show file tree
Hide file tree
Showing 6 changed files with 398 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
NODE_ENV=development
PORT=5001
MONGODB_URL='mongodb://localhost/psgc'
31 changes: 24 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,43 @@
# PSGC (Philippine Standard Geographic Code)
API used for listing all the region, province, city, municipality, and barangay. All data came from <a href='https://psa.gov.ph' target='_blank'>Philippine Statistics Authority</a>. This API includes the total population for each regions etc. and other information.

# ENDPOINTS
```https://psgc-api.herokuapp.com```<br/>
# ENDPOINTS (v1.1)
All Region - ```/api/region```<br/>
Specific Region - ```/api/region/:code```<br/>
List of Province in specific Region - ```/api/region/:code/province```<br/><br/>
All Province - ```/api/province```<br/>
Specific Province - ```/api/province/:code```<br/>
List of City in specific Province - ```/api/province/:code/city```<br/>
List of Municipality in specific Province - ```/api/province/:code/municipality```<br/>
All City - ```/api/city```<br/>
Specific City - ```/api/city/:code```<br/>
List of Barangay in specific City - ```/api/city/:code/barangay```<br/>
All Municipality - ```/api/municipality```<br/>
Specific Municipality - ```/api/municipality/:code```<br/>
List of Barangay in specific Municipality - ```/api/municipality/:code/barangay```<br/>
All Barangay - ```/api/barangay```<br/>
Specific Barangay - ```/api/barangay/:code```<br/>

# ENDPOINTS (V1)
REGION - ```/v1/region```<br/>
PROVINCE - ```/v1/province```<br/>
CITY - ```/v1/city```<br/>
MUNICIPALITY - ```/v1/municipality```<br/>
BARANGAY - ```/v1/barangay```<br/>

# SETUP
```$ npm install```

# START DEV SERVER
```$ npm run dev```

# PLANS
- [ ] fix the python script to merge all json according to appropriate codes
- [ ] automate uploading of json file once there's a new PSGC Excel File
- [ ] fix all the endpoints
- [x] fix all the endpoints
- [x] add rate limit
- [ ] create the frontend with docs
- [ ] move to a proper server
- [ ] add rate limit

Made with 💜 by Justin Balaguer
<a href='twitter.com/ojintoji/'>Twitter</a>
<a href='facebook.com/ojintojix/'>Facebook</a>
<a href='facebook.com/ojintojix/'>Facebook</a>
###### dm me on any social media above to get the json files
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"name": "psgc_backend",
"version": "1.0.0",
"version": "1.1.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node src/index.js",
"dev": "nodemon src/index.js"
},
"keywords": [],
"author": "",
"author": "Justin Balaguer",
"license": "ISC",
"dependencies": {
"cors": "^2.8.5",
"dotenv": "^8.2.0",
"express": "^4.17.1",
"express-rate-limit": "^5.2.3",
"helmet": "^4.2.0",
"mongoose": "^5.10.15",
"morgan": "^1.10.0"
Expand Down
Loading

0 comments on commit 69112ff

Please sign in to comment.