Organized
This commit is contained in:
parent
b2dcc571c2
commit
93fe5f2260
@ -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",
|
||||
|
@ -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) => {
|
Loading…
Reference in New Issue
Block a user