Fix ES module compatibility - convert server.js to ES module syntax

This commit is contained in:
idittrich-valueon 2025-06-04 12:33:42 +02:00
parent 9d1c1a8217
commit c6998cc888
2 changed files with 8 additions and 2 deletions

View file

@ -66,3 +66,4 @@ jobs:
app-name: 'poweron-nyla'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_D6C9359A57C5448A8C0BFA2D4C4B2068 }}
package: ./deploy
clean: true

View file

@ -1,5 +1,10 @@
const express = require('express');
const path = require('path');
import express from 'express';
import path from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const app = express();
// Serve static files from current directory