delete unsoported script

This commit is contained in:
SrGooglo 2025-04-02 01:51:24 +00:00
parent 12c8431bd7
commit 0aae00c8dc

View File

@ -1,25 +0,0 @@
const express = require("express")
const path = require("path")
const cors = require("cors")
const app = express()
const portFromArgs = process.argv[2]
let portListen = portFromArgs ? portFromArgs : 9000
app.use(cors({
origin: "*",
methods: "GET,HEAD,PUT,PATCH,POST,DELETE",
preflightContinue: true,
optionsSuccessStatus: 204
}))
app.use(express.static(path.join(__dirname, "dist")))
app.get("*", function (req, res) {
res.sendFile(path.join(__dirname, "dist", "index.html"))
})
app.listen(portListen)
console.log(`🌐 Listening app in port [${portListen}]`)