fix: Correct environment variables and MIME types for production
All checks were successful
build-and-deploy / filter (push) Successful in 2s
build-and-deploy / build (push) Successful in 12s
build-and-deploy / deploy (push) Successful in 9s

- Change VITE_SERVER_URL to SERVER_URL in docker-compose
- Add dist directory serving for built assets
- Configure Express to serve JS modules with correct MIME type
- Fix undefined Game Server in containers
This commit is contained in:
2025-07-05 15:53:19 -06:00
parent a0044efb42
commit 378febd8f3
3 changed files with 12 additions and 4 deletions

View File

@@ -9,8 +9,12 @@ dotenv.config({ path: `.env.${ENV}` });
const app = express();
const PORT = process.env.PORT || 3000;
// Serve static files from current directory
// Configure MIME types for modules
express.static.mime.define({'application/javascript': ['js', 'mjs']});
// Serve static files from current directory and dist
app.use(express.static('.'));
app.use(express.static('dist'));
// Serve main HTML file
app.get('/', (req, res) => {