Game!!!
This commit is contained in:
parent
2690b28e7b
commit
159f6fb26b
13 changed files with 15114 additions and 7 deletions
14
index.js
14
index.js
|
@ -2,7 +2,7 @@ const express = require('express'),
|
|||
path = require('path'),
|
||||
fs = require('fs'),
|
||||
pageUpdater = require('./pageUpdater.js')
|
||||
// ytjs = require("youtubei.js")
|
||||
// ytjs = require("youtubei.js")
|
||||
|
||||
var app = express()
|
||||
|
||||
|
@ -39,8 +39,18 @@ app.listen(PORT, () => {
|
|||
})
|
||||
|
||||
var cachePath = path.join(staticpath, 'cached')
|
||||
var gamePath = path.join(__dirname, "games")
|
||||
// var imgPath = path.join(staticpath, 'imgs')
|
||||
|
||||
app.use(function (req, res, next) {
|
||||
res.header("Cross-Origin-Embedder-Policy", "require-corp");
|
||||
res.header("Cross-Origin-Opener-Policy", "same-origin");
|
||||
next();
|
||||
});
|
||||
|
||||
|
||||
app.use("/games", express.static(gamePath))
|
||||
|
||||
if (!fs.existsSync(cachePath)) {
|
||||
fs.mkdirSync(cachePath)
|
||||
} else {
|
||||
|
@ -51,4 +61,4 @@ if (!fs.existsSync(cachePath)) {
|
|||
}
|
||||
}
|
||||
|
||||
app.use(pageUpdater.middleWare)
|
||||
app.use(pageUpdater.middleWare)
|
Loading…
Add table
Add a link
Reference in a new issue