Cannot GET /api/register

  • Hello,

    I'm learning the Qt Cloud Services tutorial: Server-side todo application. I have gotten to the REST API implementation section and i'm facing this difficulty:

    When i fire http://localgost:8080/api/register in my browser, i get this feed back: "Cannot GET /api/register.
    When i use postman, i get the following:

    TypeError: Not a string or buffer<br>    at Hash.update (crypto.js:209:17)<br>    at /home/samobeng/brains/qt/todo2015/server/api/routes.js:8:22<br>    at Layer.handle [as handle_request] (/home/samobeng/brains/qt/todo2015/node_modules/express/lib/router/layer.js:82:5)<br>    at next (/home/samobeng/brains/qt/todo2015/node_modules/express/lib/router/route.js:110:13)<br>    at Route.dispatch (/home/samobeng/brains/qt/todo2015/node_modules/express/lib/router/route.js:91:3)<br>    at Layer.handle [as handle_request] (/home/samobeng/brains/qt/todo2015/node_modules/express/lib/router/layer.js:82:5)<br>    at /home/samobeng/brains/qt/todo2015/node_modules/express/lib/router/index.js:267:22<br>    at Function.proto.process_params (/home/samobeng/brains/qt/todo2015/node_modules/express/lib/router/index.js:321:12)<br>    at next (/home/samobeng/brains/qt/todo2015/node_modules/express/lib/router/index.js:261:10)<br>    at cookieParser (/home/samobeng/brains/qt/todo2015/node_modules/cookie-parser/index.js:34:14)

    I will appreciate any help to get past this stage. And also any other helpful tips that i may need in the future. Thank you all

  • Partly fixed solution:

    I got it to work by commenting out password in userObject:

    password: pwdhash.update(req.body.password).digest('hex')

    Is there an appropriate way to handle the password problem. The link to the QT cloud services tutorial is this:


Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.