Skip to content

Commit a039786

Browse files
committed
sync
1 parent 40e1286 commit a039786

23 files changed

+3470
-464
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
**/node_modules
22
**.DS_Store
3+
.gitpod.yml

index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ const __dirname = url.fileURLToPath(new URL('.', import.meta.url));
1818
let navbar = fs.readFileSync('./templates/navbar.html', 'utf-8');
1919
let meta = fs.readFileSync('./templates/meta.html', 'utf-8');
2020

21-
fs.readdirSync('./pages').forEach(file => {
21+
/*fs.readdirSync('./pages').forEach(file => {
2222
let fileData = fs.readFileSync('./pages/' + file, 'utf-8');
2323
fileData = fileData.replace('<body>', '<body> ' + navbar).replace('</head>', meta + '</head>');
2424
app.get(`/${file.split('.')[0] === 'index' ? '' : file.split('.')[0]}`, (req, res) => res.status(200).send(fileData));
25-
});
25+
});*/
2626

27-
app.use(express.static(path.join(__dirname, '/static')));
27+
app.use(express.static(path.join(__dirname, '/static'), { extensions: ['html'] }));
2828

2929
app.get('/cdn/*', cors({
3030
origin: false
@@ -46,9 +46,9 @@ app.get('/cdn/*', cors({
4646
} else next();
4747
});
4848

49-
let notFoundFile = fs.readFileSync('./pages/404.html', 'utf-8');
49+
/*let notFoundFile = fs.readFileSync('./pages/404.html', 'utf-8');
5050
notFoundFile = notFoundFile.replace('<body>', '<body> ' + navbar).replace('</head>', meta + '</head>');
51-
app.use((req, res, next) => res.status(404).send(notFoundFile));
51+
app.use((req, res, next) => res.status(404).send(notFoundFile));*/
5252

5353
server.on('request', (req, res) => {
5454
if (bareServer.shouldRoute(req)) bareServer.routeRequest(req, res);

package-lock.json

Lines changed: 1297 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pages/TOS.html

Lines changed: 0 additions & 213 deletions
This file was deleted.

pages/games.html

Lines changed: 0 additions & 63 deletions
This file was deleted.

pages/index.html

Lines changed: 0 additions & 64 deletions
This file was deleted.

pages/search.html

Lines changed: 0 additions & 60 deletions
This file was deleted.

pages/view.html

Lines changed: 0 additions & 31 deletions
This file was deleted.

pages/404.html renamed to static/404.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<body>
1515
<div class="content box">
1616
<h1 style="font-size: 50px;">404</h1>
17+
1718
<p>Looks you found a page that does not exist! Try checking your url for spelling mistakes.<br><br>Or, you can report it in our <a href="//dsc.gg/skoolworld">discord server</a>.</p>
1819
</div>
1920

File renamed without changes.

0 commit comments

Comments
 (0)