COMP5347 - W10 - Restful Service - 2020
COMP5347 - W10 - Restful Service - 2020
Learning Objectives
• Understand how to create and consume restful service in Node.js
1|Page
COMP5347 Tutorial
Task: Start the mongodb server using the following command, replace the “path” with a
path to the local mongodb working directory where you create and use in Week 7 to
Week 9 (the wikipedia database with the revisions collections).
mongod --dbpath path
Right click reverser.js on the explorer panel and Run as Node.js application.
Open the browser and go to the address below. You should be able to see something
looks like the screenshot below.
http://localhost:3000/revision/collection/BBC
Now please implement the parse which will check if the URL (Wikipedia API) is available,
output the service status in console. If it is available, please parse the returned JSON
objects and output how many unique users have made revisions to article “CNN”.
2|Page