|
|
|
@ -5,7 +5,8 @@ const app = express()
|
|
|
|
|
const playerHtml = fs.readFileSync('site.html', 'utf-8')
|
|
|
|
|
const port = process.env.PORT??3500
|
|
|
|
|
|
|
|
|
|
let list = fs.readFileSync('videolist', 'utf-8').split('\n')
|
|
|
|
|
let list = []
|
|
|
|
|
if (fs.existsSync('videolist')) list = fs.readFileSync('videolist', 'utf-8').split('\n')
|
|
|
|
|
|
|
|
|
|
app.get('/', (req, res) => {
|
|
|
|
|
res.send(playerHtml.replace('{{VIDEO_ID_HERE}}', list[Math.floor(Math.random()*list.length)]))
|
|
|
|
|