Organized

This commit is contained in:
Zakary Timson 2024-10-27 08:25:06 -04:00
parent b2dcc571c2
commit 93fe5f2260
10 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@
"main": "index.js", "main": "index.js",
"type": "module", "type": "module",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "start": "node src/main.js"
}, },
"author": "", "author": "",
"license": "MIT", "license": "MIT",

View File

View File

@ -12,7 +12,7 @@ export default class Http extends Controller {
this.express.get('*', (req, res) => { this.express.get('*', (req, res) => {
let p = req.params['0']; let p = req.params['0'];
if(!p || p == '/') p = 'index.html'; if(!p || p == '/') p = 'index.html';
const absolute = path.join(import.meta.url, '/../', p).replace('file:', ''); const absolute = path.join(import.meta.url, '/../../ui/', p).replace('file:', '');
res.sendFile(absolute); res.sendFile(absolute);
}); });
this.express.get('/api/*', async (req, res) => { this.express.get('/api/*', async (req, res) => {