mirror of
https://gitplac.si/aljaxus/upn-qr.git
synced 2025-12-17 04:00:59 +00:00
server index.html and style.css on port 80
This commit is contained in:
13
src/index.js
Normal file
13
src/index.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import express from 'express'
|
||||
import path from 'path'
|
||||
import { dirname } from 'path'
|
||||
import { fileURLToPath } from 'url'
|
||||
|
||||
const app = express()
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
|
||||
app.get('/', (req, res) => res.sendFile(path.join(__dirname, 'index.html')))
|
||||
app.get('/style.css', (req, res) => res.sendFile(path.join(__dirname, 'style.css')))
|
||||
|
||||
app.listen(80, () => console.log(`UPN-QR started on port 80`))
|
||||
Reference in New Issue
Block a user