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