pandora/index.js
2026-07-12 22:04:52 -03:00

21 lines
No EOL
701 B
JavaScript

import express from "express";
import path from "path";
import { fileURLToPath } from "url";
const app = express();
const PORT = process.env.PORT || 3100;
// Resolve __dirname in ES modules
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
// Serve static assets from the public folder
app.use(express.static(path.join(__dirname, "public")));
// Start static file server
app.listen(PORT, () => {
console.log(`==================================================`);
console.log(` Pandora Chat Static Server is running!`);
console.log(` URL: http://localhost:${PORT}`);
console.log(`==================================================`);
});