Fix fonts
This commit is contained in:
parent
58df7b091f
commit
22d70896b3
1 changed files with 3 additions and 0 deletions
3
index.js
3
index.js
|
@ -40,6 +40,7 @@ app.listen(PORT, () => {
|
||||||
|
|
||||||
var cachePath = path.join(staticpath, 'cached')
|
var cachePath = path.join(staticpath, 'cached')
|
||||||
var gamePath = path.join(__dirname, "games")
|
var gamePath = path.join(__dirname, "games")
|
||||||
|
var fontPath = path.join(staticpath, "fonts")
|
||||||
// var imgPath = path.join(staticpath, 'imgs')
|
// var imgPath = path.join(staticpath, 'imgs')
|
||||||
|
|
||||||
app.use("/games", function (req, res, next) {
|
app.use("/games", function (req, res, next) {
|
||||||
|
@ -51,6 +52,8 @@ app.use("/games", function (req, res, next) {
|
||||||
|
|
||||||
app.use("/games", express.static(gamePath))
|
app.use("/games", express.static(gamePath))
|
||||||
|
|
||||||
|
app.use("/fonts", express.static(fontPath))
|
||||||
|
|
||||||
if (!fs.existsSync(cachePath)) {
|
if (!fs.existsSync(cachePath)) {
|
||||||
fs.mkdirSync(cachePath)
|
fs.mkdirSync(cachePath)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue