diff --git a/package.json b/package.json index d5a2e9b..a8f5f15 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/apollo.js b/src/apollo.js similarity index 100% rename from apollo.js rename to src/apollo.js diff --git a/cli.js b/src/cli.js similarity index 100% rename from cli.js rename to src/cli.js diff --git a/controller.js b/src/controller.js similarity index 100% rename from controller.js rename to src/controller.js diff --git a/http.js b/src/http.js similarity index 86% rename from http.js rename to src/http.js index d9767a8..840cbc6 100644 --- a/http.js +++ b/src/http.js @@ -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) => { diff --git a/index.js b/src/main.js similarity index 100% rename from index.js rename to src/main.js diff --git a/misc.js b/src/misc.js similarity index 100% rename from misc.js rename to src/misc.js diff --git a/sensor-suite.js b/src/sensor-suite.js similarity index 100% rename from sensor-suite.js rename to src/sensor-suite.js diff --git a/serial.js b/src/serial.js similarity index 100% rename from serial.js rename to src/serial.js diff --git a/index.html b/ui/index.html similarity index 100% rename from index.html rename to ui/index.html