mirror of
https://github.com/taogaetz/chefbible.git
synced 2025-12-06 11:47:24 -05:00
14 lines
408 B
JavaScript
14 lines
408 B
JavaScript
// ES module server wrapper that provides __dirname and __filename for Prisma
|
|
import { fileURLToPath } from 'url';
|
|
import { dirname } from 'path';
|
|
|
|
// Provide __dirname and __filename for Prisma
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = dirname(__filename);
|
|
|
|
global.__dirname = __dirname;
|
|
global.__filename = __filename;
|
|
|
|
// Import and start the server
|
|
import('./build/index.js');
|