Live preview server for user specified server as defined with Live Preview Base Url Project setting. In a clean installation of Brackets, this is the highest priority server provider, if defined.
Configuration parameters for this server:
function UserServer(config) {
BaseServer.call(this, config);
}
UserServer.prototype = Object.create(BaseServer.prototype);
UserServer.prototype.constructor = UserServer;
Determines whether we can serve local file.
UserServer.prototype.canServe = function (localPath) {
// UserServer can only function when the project specifies a base URL
if (!this._baseUrl) {
return false;
}
// If we can't transform the local path to a project relative path,
// the path cannot be served
if (localPath === this._pathResolver(localPath)) {
return false;
}
return LiveDevelopmentUtils.isStaticHtmlFileExt(localPath) ||
LiveDevelopmentUtils.isServerHtmlFileExt(localPath);
};
exports.UserServer = UserServer;
});