diff --git a/options.json b/options.json index 2a995ed..eacc17f 100644 --- a/options.json +++ b/options.json @@ -4,7 +4,7 @@ "respawn": false }, "serverOptions": { - "serveFiles": "/files", + "serveFiles": "./files", "callbackURL": "/api/login", "http": { "port": 4000 diff --git a/src/server/Server.js b/src/server/Server.js index a6e4b42..4c7c07f 100644 --- a/src/server/Server.js +++ b/src/server/Server.js @@ -44,6 +44,8 @@ class Server extends EventEmitter { if (!httpOpts?.port) return Util.fatal(new Error(`Missing http.port in server options`)); this.port = httpOpts.port + this._shardId; this.domain = NODE_ENV === 'development' ? `localhost:${this.port}` : options.domain; + this.serveFiles = null; + if (options.serveFiles) this.serveFiles = path.resolve(options.serveFiles); this.server = null; this.app = express();