initial
This commit is contained in:
commit
584abdb00e
13 changed files with 2815 additions and 0 deletions
21
index.js
Normal file
21
index.js
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
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(`==================================================`);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue