This commit is contained in:
Erik 2022-03-22 15:21:44 +02:00
parent 0efd1f35aa
commit 2fdb3fd7f8
No known key found for this signature in database
GPG Key ID: FEFF4B220DDF5589

View File

@ -16,11 +16,15 @@ class Home extends Endpoint {
['get', this.get.bind(this)] ['get', this.get.bind(this)]
]; ];
this.mediaDir = path.join(this.client.baseDirectory, 'media'); // this.mediaDir = path.join(this.client.baseDirectory, 'media');
const assets = path.resolve(this.client.baseDirectory, '../client/build/static'); const assets = path.resolve(this.client.baseDirectory, '../client/build/static');
const manifest = path.resolve(this.client.baseDirectory, '../client/build/manifest.json'); const manifest = path.resolve(this.client.baseDirectory, '../client/build/manifest.json');
const favicon = path.resolve(this.client.baseDirectory, '../client/build/favicon.ico');
const robots = path.resolve(this.client.baseDirectory, '../client/build/robots.txt');
this.client.app.use('/static', express.static(assets)); this.client.app.use('/static', express.static(assets));
this.client.app.use('/manifest.json', express.static(manifest)); this.client.app.use('/manifest.json', express.static(manifest));
this.client.app.use('/favicon.ico', express.static(favicon));
this.client.app.use('/robots.txt', express.static(robots));
this.init(); this.init();