added helpers to nodejs-example server, so it can be used from tests