Express.js Server can't load exported files

Hey there,

I'm currently trying to run a prototype on an Express.js server. Sadly I get this error "Refused to execute http://localhost:3000/indexServerEins.hyperesources/indexservereins_hype_generated_script.js as script because "X-Content-Type-Options: nosniff" was given and its Content-Type is not a script MIME type." The page is just blank.

This is what my server.js looks like. the server itself works:

const express = require('express');
const router = express.Router();
const path = require('path');

const touchpointApp = express();
// const smartMirror = express();


router.get('/', function(req, res){
    res.sendFile(path.join(__dirname + '/indexServerEins.html'));
});

touchpointApp.use('/', router);
touchpointApp.listen(process.env.port || 3000);

console.log('Running on Port 3000');


What's the problem here?

Maybe related to

You have nothing that is serving any file other than the indexServerEins.html. You probably need to setup a way to serve static files and make sure that your indexServerEins.html points properly to them.

See docs like: