Node.js & Partial.js redirect from controller

I have this:

exports.install = function (framework) {
    framework.route('/CreateRoom', redirect_createroom);
};

function redirect_createroom() {
    var roomId = 10000;
    response.writeHead(301, {'Location': 'Room/' + roomId});
    response.end();
}

And when I go to localhost:8182/CreateRoom, I get the error:

ReferenceError: response is not defined ReferenceError: response is not defined
    at Object.redirect_createroom (/Users/ec/Desktop/EPNodeJs/controllers/default.js:21:5)
    at Subscribe._execute (/Users/ec/Desktop/EPNodeJs/node_modules/partial.js/index.js:3:19370)
    at Subscribe.execute (/Users/ec/Desktop/EPNodeJs/node_modules/partial.js/index.js:3:17657)
    at Subscribe.prepare (/Users/ec/Desktop/EPNodeJs/node_modules/partial.js/index.js:3:18828)
    at Subscribe._end (/Users/ec/Desktop/EPNodeJs/node_modules/partial.js/index.js:3:21003)
    at IncomingMessage.emit (events.js:92:17)
    at _stream_readable.js:938:16
    at process._tickCallback (node.js:419:13)

I've searched but did not find an answer to this question.

This controller is implemented with partial.js. I wasn't able to add this info in the tags since I don't have the proper level.

Thanks E.

Should be using this to do the redirect in your controller.

for example:

this.redirect('Room/'+roomId);

the docs and domain have been moved to totaljs