This is a random nodejs + express exercise for myself. It is just a simple web page for query the HK KMB Bus Arrival Time.
-
First clone this repo
# git clone https://github.com/shunwatai/kmb-bus-query
-
To run this app, please install the required nodejs module by following commands:
# cd kmb-bus-query # npm install express request body-parser
-
run it with a port number, I use port 3000 here
# node kmb.js 3000
-
open a web browser and go to http://serverIP:3000/form.html
-
input bus number --> select direction --> select bus stop
-
Wait for few seconds and the time of next bus arrival should be displayed
Special thanks to nubotz, this little exercise is referenced from his telegram bot.