I need a microservice written in Node.js that receives a POST of a URL, and returns the following for all broken links within the page: response code, resource type, position, and xpath information. Broken is defined as HTTP status >= 400.
HTTP SERVICE:
The HTTP service should have two endpoints. The first one requests a check of a certain URL, and it returns a tracking ID for that request. The second one takes an ID, and returns the current results. This may be “processing” if the URL is still being processed, or the results if it is done.
POST /check
Body:
{ url: ‘[login to view URL]’ }
Response:
{ id: 8273df4f33d6f819d32c0a79f93b68a4d45fae5187a1acafd2e5049b5d51879e }
GET /:id
Response if still processing:
HTTP 202
{ status: ‘processing’ }
Response if done:
HTTP 200
{
status: 'done',
results: [
{
"url": "[login to view URL]",
"type": "link",
"http_code": 404,
"position": {
"column": 0,
"line": 58
},
"xpath": "/html/body/div[1]/div[7]/span[1]/center[1]/div[1]/div[1]/div[1]/div[1]/a[1]"
},
{
"url": "[login to view URL]",
"type": "stylesheet",
"http_code": 404,
"position": {
"column": 0,
"line": 58
},
"xpath": "/html/head"
}
]
}
PROCESSING JOB:
The processing job runs as a continuous daemon process. On the backend, the POST /check endpoint will write to a data store/message queue. The processing job reads from this data store, and posts results as it completes them.
It contains a function takes a URL, and outputs the results. It should leverage an existing npm package, eg. broken-link-checker, and may take several seconds to run, mostly due to network latency. It should be able to process several URLs in parallel, which may be supported by the package (eg. broken-link-checker supports this).
TESTING:
Testing should be provided to cover the following cases:
a[href]
style[src]
script[src]
link[href]
area[href]
img[src]
audio[src]
video[src]
embed[src]
iframe[src]
input[src]
source[src]
track[src]
Hi,
I am Shafayat, am a Node.JS developer.
I believe I am one of the best candidates for this job.
If you have a minute , I would request you to send me a message so we can discuss further specifications :)
Regards
Hello I can do this job for you using nodejs with expressjs and mongodb for datastore and then run the processing job in parallel since the nodejs is asynchronous
I want to discuss this project with you further, let me know the best suitable time for you to schedule the meeting, Feel free to message me at any time, i used to be online 14 hrs in a day on this website so probably you will get a quick response from my end.
Hello,
I understood the initial scope of this project.
Although i want to discuss further this job in order to
prepare the final concept for this project.
After Complete discussion over the call or in chat, i
will prepare following things for you
- Technical Project Proposal
- Flow chart for this Project
- Execution plan (Step by step procedure with explanation how and at what that we are going to execute a particular task)