Skip to content

Commit

Permalink
Implemented the server option 'hostname'
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrienCastex committed May 24, 2017
1 parent ef4a3c0 commit 0ab2be2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/server/WebDAVServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ var WebDAVServer = (function () {
}
});
});
this.server.listen(port);
this.server.listen(port, this.options.hostname);
};
WebDAVServer.prototype.stop = function (callback) {
if (this.server) {
Expand Down
1 change: 1 addition & 0 deletions lib/server/WebDAVServerOptions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export declare class WebDAVServerOptions {
rootResource?: IResource;
userManager?: IUserManager;
lockTimeout?: number;
hostname?: string;
port?: number;
}
export default WebDAVServerOptions;
Expand Down
1 change: 1 addition & 0 deletions lib/server/WebDAVServerOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ var WebDAVServerOptions = (function () {
this.rootResource = new RootResource_1.RootResource();
this.userManager = new SimpleUserManager_1.SimpleUserManager();
this.lockTimeout = 3600;
this.hostname = '::';
this.port = 1900;
}
return WebDAVServerOptions;
Expand Down
2 changes: 1 addition & 1 deletion src/server/WebDAVServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export class WebDAVServer
}
})
})
this.server.listen(port);
this.server.listen(port, this.options.hostname,);
}

stop(callback : () => void)
Expand Down
1 change: 1 addition & 0 deletions src/server/WebDAVServerOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export class WebDAVServerOptions
rootResource ?: IResource = new RootResource()
userManager ?: IUserManager = new SimpleUserManager()
lockTimeout ?: number = 3600
hostname ?: string = '::'
port ?: number = 1900
}
export default WebDAVServerOptions;
Expand Down

0 comments on commit 0ab2be2

Please sign in to comment.