fix: use fileURLToPath for dirname resolution (#289)
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import express from 'express';
|
||||
import cors from 'cors';
|
||||
import RateLimit from 'express-rate-limit';
|
||||
import { Sequelize } from 'sequelize';
|
||||
const __dirname = path.dirname(new URL(import.meta.url).pathname);
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
const app = express();
|
||||
|
||||
// enable frontend access
|
||||
|
||||
Reference in New Issue
Block a user