Fix ES module compatibility - convert server.js to ES module syntax
This commit is contained in:
parent
9d1c1a8217
commit
c6998cc888
2 changed files with 8 additions and 2 deletions
1
.github/workflows/int_poweron-nyla-int.yml
vendored
1
.github/workflows/int_poweron-nyla-int.yml
vendored
|
|
@ -66,3 +66,4 @@ jobs:
|
||||||
app-name: 'poweron-nyla'
|
app-name: 'poweron-nyla'
|
||||||
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_D6C9359A57C5448A8C0BFA2D4C4B2068 }}
|
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_D6C9359A57C5448A8C0BFA2D4C4B2068 }}
|
||||||
package: ./deploy
|
package: ./deploy
|
||||||
|
clean: true
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,10 @@
|
||||||
const express = require('express');
|
import express from 'express';
|
||||||
const path = require('path');
|
import path from 'path';
|
||||||
|
import { fileURLToPath } from 'url';
|
||||||
|
|
||||||
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
|
const __dirname = path.dirname(__filename);
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
|
|
||||||
// Serve static files from current directory
|
// Serve static files from current directory
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue