mirror of
https://github.com/QuiteAFancyEmerald/Holy-Unblocker.git
synced 2025-05-15 12:50:01 -04:00
Starting to comment over the file navigation system.
This commit is contained in:
parent
ee32dab52d
commit
d5e68b8e7f
1 changed files with 12 additions and 1 deletions
|
@ -76,7 +76,18 @@ server.on('upgrade', (req, socket, head) => {
|
|||
}
|
||||
});
|
||||
|
||||
router.get('/', async (req, res) => res.send(paintSource(tryReadFile(path.join(__dirname, 'views', ['/', '/?'].includes(req.url) ? pages.index : pages[Object.keys(req.query)[0]])))));
|
||||
|
||||
// All website files are stored in the /views directory.
|
||||
// This takes one of those files and displays it for a site visitor.
|
||||
router.get('/', async (req, res) => res.send(paintSource(tryReadFile(
|
||||
path.join(__dirname,
|
||||
'views',
|
||||
// This returns the file path, and has the index page set as the home page.
|
||||
'/?'.indexOf(req.url) ? pages[Object.keys(req.query)[0]] : pages.index
|
||||
)
|
||||
))));
|
||||
|
||||
|
||||
app.use(router);
|
||||
app.use(express.static(path.join(__dirname, 'views')));
|
||||
app.use("/uv/", express.static(uvPath));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue