Skip to content

Commit 69112ff

Browse files
📦 v1.1
1 parent 296d5d4 commit 69112ff

File tree

6 files changed

+398
-14
lines changed

6 files changed

+398
-14
lines changed

.env.sample

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
NODE_ENV=development
2+
PORT=5001
3+
MONGODB_URL='mongodb://localhost/psgc'

README.md

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,43 @@
11
# PSGC (Philippine Standard Geographic Code)
22
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.
33

4-
# ENDPOINTS
5-
```https://psgc-api.herokuapp.com```<br/>
4+
# ENDPOINTS (v1.1)
5+
All Region - ```/api/region```<br/>
6+
Specific Region - ```/api/region/:code```<br/>
7+
List of Province in specific Region - ```/api/region/:code/province```<br/><br/>
8+
All Province - ```/api/province```<br/>
9+
Specific Province - ```/api/province/:code```<br/>
10+
List of City in specific Province - ```/api/province/:code/city```<br/>
11+
List of Municipality in specific Province - ```/api/province/:code/municipality```<br/>
12+
All City - ```/api/city```<br/>
13+
Specific City - ```/api/city/:code```<br/>
14+
List of Barangay in specific City - ```/api/city/:code/barangay```<br/>
15+
All Municipality - ```/api/municipality```<br/>
16+
Specific Municipality - ```/api/municipality/:code```<br/>
17+
List of Barangay in specific Municipality - ```/api/municipality/:code/barangay```<br/>
18+
All Barangay - ```/api/barangay```<br/>
19+
Specific Barangay - ```/api/barangay/:code```<br/>
20+
21+
# ENDPOINTS (V1)
622
REGION - ```/v1/region```<br/>
723
PROVINCE - ```/v1/province```<br/>
824
CITY - ```/v1/city```<br/>
925
MUNICIPALITY - ```/v1/municipality```<br/>
1026
BARANGAY - ```/v1/barangay```<br/>
27+
1128
# SETUP
1229
```$ npm install```
1330

1431
# START DEV SERVER
1532
```$ npm run dev```
1633

1734
# PLANS
18-
- [ ] fix the python script to merge all json according to appropriate codes
19-
- [ ] automate uploading of json file once there's a new PSGC Excel File
20-
- [ ] fix all the endpoints
35+
- [x] fix all the endpoints
36+
- [x] add rate limit
37+
- [ ] create the frontend with docs
2138
- [ ] move to a proper server
22-
- [ ] add rate limit
2339

2440
Made with 💜 by Justin Balaguer
2541
<a href='twitter.com/ojintoji/'>Twitter</a>
26-
<a href='facebook.com/ojintojix/'>Facebook</a>
42+
<a href='facebook.com/ojintojix/'>Facebook</a>
43+
###### dm me on any social media above to get the json files

package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
{
22
"name": "psgc_backend",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"description": "",
55
"main": "index.js",
66
"scripts": {
77
"start": "node src/index.js",
88
"dev": "nodemon src/index.js"
99
},
1010
"keywords": [],
11-
"author": "",
11+
"author": "Justin Balaguer",
1212
"license": "ISC",
1313
"dependencies": {
1414
"cors": "^2.8.5",
1515
"dotenv": "^8.2.0",
1616
"express": "^4.17.1",
17+
"express-rate-limit": "^5.2.3",
1718
"helmet": "^4.2.0",
1819
"mongoose": "^5.10.15",
1920
"morgan": "^1.10.0"

0 commit comments

Comments
 (0)