Compare commits
No commits in common. "392532787579e4937de4d8e9a64c44b6372bf7d7" and "4e01a2497ca84045f62e02b5c88b65d844d7becf" have entirely different histories.
3925327875
...
4e01a2497c
4 changed files with 26 additions and 35 deletions
|
@ -1,28 +0,0 @@
|
||||||
const express = require("express"),
|
|
||||||
path = require("path")
|
|
||||||
|
|
||||||
var app = express()
|
|
||||||
|
|
||||||
const PORT = process.env.PORT || 8080
|
|
||||||
|
|
||||||
const cachePath = path.join(__dirname, 'cached')
|
|
||||||
const assetPath = path.join(__dirname, "assets")
|
|
||||||
|
|
||||||
app.listen(PORT, () => {
|
|
||||||
console.log("Violet's Purgatory is now listening on port: " + PORT)
|
|
||||||
})
|
|
||||||
|
|
||||||
const pageUpdater = require("./pageUpdater.js")
|
|
||||||
|
|
||||||
app.use("/fonts", express.static(path.join(assetPath, "fonts")))
|
|
||||||
app.use("/cached", express.static(cachePath))
|
|
||||||
app.use("/imgs", express.static(path.join(assetPath, "Images")))
|
|
||||||
app.use("/snds", express.static(path.join(assetPath, "Sounds")))
|
|
||||||
|
|
||||||
app.use("/emojis", express.static(path.join(cachePath, "emojis")))
|
|
||||||
|
|
||||||
app.use(pageUpdater.middleWare)
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
app: app
|
|
||||||
}
|
|
23
index.js
23
index.js
|
@ -1,8 +1,12 @@
|
||||||
const express = require('./expressHandler.js'),
|
const express = require('express'),
|
||||||
path = require('path'),
|
path = require('path'),
|
||||||
fs = require('fs'),
|
fs = require('fs'),
|
||||||
WebSocket = require("ws")
|
WebSocket = require("ws")
|
||||||
|
|
||||||
|
var app = express()
|
||||||
|
|
||||||
|
const PORT = process.env.PORT || 8080
|
||||||
|
|
||||||
const staticpath = path.join(__dirname, 'static')
|
const staticpath = path.join(__dirname, 'static')
|
||||||
const cachePath = path.join(__dirname, 'cached')
|
const cachePath = path.join(__dirname, 'cached')
|
||||||
const assetPath = path.join(__dirname, "assets")
|
const assetPath = path.join(__dirname, "assets")
|
||||||
|
@ -23,8 +27,21 @@ if (!fs.existsSync(announcementFile)) {
|
||||||
fs.writeFileSync(announcementFile, ``)
|
fs.writeFileSync(announcementFile, ``)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const pageUpdater = require('./pageUpdater.js')
|
||||||
|
|
||||||
var constants = JSON.parse(fs.readFileSync(path.join(__dirname, 'constants.json')))
|
var constants = JSON.parse(fs.readFileSync(path.join(__dirname, 'constants.json')))
|
||||||
|
|
||||||
|
app.listen(PORT, () => {
|
||||||
|
console.log("Violet's Purgatory is now listening on port: " + PORT)
|
||||||
|
})
|
||||||
|
|
||||||
|
app.use("/fonts", express.static(path.join(assetPath, "fonts")))
|
||||||
|
app.use("/cached", express.static(cachePath))
|
||||||
|
app.use("/imgs", express.static(path.join(assetPath, "Images")))
|
||||||
|
app.use("/snds", express.static(path.join(assetPath, "Sounds")))
|
||||||
|
|
||||||
|
app.use("/emojis", express.static(path.join(cachePath, "emojis")))
|
||||||
|
|
||||||
if (!fs.existsSync(cachePath)) {
|
if (!fs.existsSync(cachePath)) {
|
||||||
fs.mkdirSync(cachePath)
|
fs.mkdirSync(cachePath)
|
||||||
}
|
}
|
||||||
|
@ -33,10 +50,12 @@ if (!fs.existsSync(path.join(cachePath, "emojis"))) {
|
||||||
fs.mkdirSync(path.join(cachePath, "emojis"))
|
fs.mkdirSync(path.join(cachePath, "emojis"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
app.use(pageUpdater.middleWare)
|
||||||
|
|
||||||
process.on('uncaughtException', (err, origin) => {
|
process.on('uncaughtException', (err, origin) => {
|
||||||
fs.writeSync(
|
fs.writeSync(
|
||||||
process.stderr.fd,
|
process.stderr.fd,
|
||||||
`Caught exception: ${err}\n` +
|
`Caught exception: ${err}\n` +
|
||||||
`Exception origin: ${origin}`,
|
`Exception origin: ${origin}`,
|
||||||
);
|
);
|
||||||
});
|
});
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
#card {
|
#card {
|
||||||
background-color: rgba(25, 0, 70, 1);
|
background-color: rgba(20, 5, 90, 0.5);
|
||||||
/* backdrop-filter: blur(5px); */
|
/* backdrop-filter: blur(5px); */
|
||||||
}
|
}
|
||||||
.magicStuff {
|
.magicStuff {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
#card {
|
#card {
|
||||||
background-color: rgba(25, 0, 70, 1);
|
background-color: rgba(50, 0, 90, 0.5);
|
||||||
/* backdrop-filter: blur(5px); */
|
/* backdrop-filter: blur(5px); */
|
||||||
}
|
}
|
||||||
.rainStuff {
|
.rainStuff {
|
||||||
|
|
Loading…
Reference in a new issue