i get a live depoly, index.html page loads, but i cant get to any of the other HTML pages
directory structure is:
in the root directory:
-client/
overlay.html
-css/
Style.css
-server/
WS server.js
-control/
control.html
websocket server seems to be working but i get an error of “404 cannot Get” on all subfolder HTML pages, the index.html in the root loads correctly
this is the code for the express static folders:
const app = express();
// Serve static files for client folder
app.use(‘/client’, express.static(path.join(__dirname, ‘public/client’)));
// Serve static files for control folder
app.use(‘/control’, express.static(path.join(__dirname, ‘public/control’)));
// Serve static files for CSS folder
app.use(‘/css’, express.static(path.join(__dirname, ‘public/css’)));
// Serve static files for index.html
app.use(express.static(path.join(__dirname, ‘server’)));
app.get(‘/’, (req, res) => {
res.sendFile(path.join(__dirname, ‘index.html’));
});
not sure why this is happening?