logo

Crowdly

At the server app.js , expand the server’s API (routing) to handle the regis...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

At the server app.js, expand the server’s API

(routing)

to handle the registration request.

The request

processing must extract the enclosed JSON object and

then call the specified

functions to 1) validate the client inputs,

then

2) based on the

validated data, register the “good thing” in the database and send the JSON

response (or report an error).

Show

only

changed/added

code, including where the change is made.  

Hint: The supplied helper functions extractJSON (promise based), jsonResponse, reportError may be useful.  

More questions like this

Want instant access to all verified answers on www.moodle.aau.dk?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!