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",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"start": "node src/main.js"
},
"author": "",
"license": "MIT",

View File

View File

@ -12,7 +12,7 @@ export default class Http extends Controller {
this.express.get('*', (req, res) => {
let p = req.params['0'];
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);
});
this.express.get('/api/*', async (req, res) => {