reference servefiles

This commit is contained in:
Erik 2022-11-10 16:14:02 +02:00
parent 7209cce6ee
commit 1878319717
Signed by: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB
2 changed files with 3 additions and 1 deletions

View File

@ -4,7 +4,7 @@
"respawn": false
},
"serverOptions": {
"serveFiles": "/files",
"serveFiles": "./files",
"callbackURL": "/api/login",
"http": {
"port": 4000

View File

@ -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();