|
|
@ -8,6 +8,15 @@ const app = express(); |
|
|
const server = http.createServer(app); |
|
|
const server = http.createServer(app); |
|
|
const io = new Server(server); |
|
|
const io = new Server(server); |
|
|
|
|
|
|
|
|
|
|
|
// Serve models with correct MIME type
|
|
|
|
|
|
app.use('/models', express.static(path.join(__dirname, 'models'), { |
|
|
|
|
|
setHeaders: (res, filePath) => { |
|
|
|
|
|
if (filePath.endsWith('.glb')) { |
|
|
|
|
|
res.setHeader('Content-Type', 'model/gltf-binary'); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
})); |
|
|
|
|
|
|
|
|
// Serve your existing static files (HTML, JS, CSS)
|
|
|
// Serve your existing static files (HTML, JS, CSS)
|
|
|
app.use(express.static(path.join(__dirname, 'dist'))); |
|
|
app.use(express.static(path.join(__dirname, 'dist'))); |
|
|
|
|
|
|
|
|
|