This project includes two parts
-
Connect scene spots API from Ministry of Transportation And Communications (MOTC Transport API V2), implementing a interface for these data using React.
-
Designed a middleware that limit the number of requests from a single IP to 1000. If the user is exceed the limit, return 429 (Too Many Requests)
Install packages
npm install
Activate server (port:3000)
npm run start
Activate client (port:8080)
npm run dev
├── README.md
├── package.json
├── package-lock.json
├── tsconfig
├── index.html
│
├── src
│ │
│ ├── App.tsx
│ │
│ ├── scenicSpot
│ │ ├── all
│ │ ├── city
│ │ ├── Intro
│ │ ├── Navbar
│ │ └── scrollHandler
│ │
│ └── view
│ └── rateLimitTest
│
└── server
│
├── index.js
│
├── model
│ └── reqNum
│
└── config/db