Simplified: remove Tailwind, standalone static HTML
Some checks failed
Deploy to Easypanel / deploy (push) Has been cancelled
Some checks failed
Deploy to Easypanel / deploy (push) Has been cancelled
This commit is contained in:
@@ -3,8 +3,8 @@ import { readFile } from 'node:fs/promises'
|
||||
import { join, extname } from 'node:path'
|
||||
import { existsSync } from 'node:fs'
|
||||
|
||||
const PORT = process.env.PORT || 8080
|
||||
const DIST_DIR = process.env.DIST_DIR || './dist'
|
||||
const PORT = process.env.PORT || 4321
|
||||
const DIST_DIR = './dist'
|
||||
|
||||
const mimeTypes = {
|
||||
'.html': 'text/html',
|
||||
@@ -63,12 +63,10 @@ const server = createServer(async (req, res) => {
|
||||
}
|
||||
}
|
||||
|
||||
// 404
|
||||
res.writeHead(404)
|
||||
res.end('Not found')
|
||||
})
|
||||
|
||||
server.listen(PORT, '0.0.0.0', () => {
|
||||
console.log(`Server running at http://0.0.0.0:${PORT}`)
|
||||
console.log(`Serving files from ${DIST_DIR}`)
|
||||
})
|
||||
Reference in New Issue
Block a user