Compare commits

..

No commits in common. "00f11f8c08deaadcbbe64ed00057bf9201645260" and "4b70f8d67b516949b865be94e87aa2cf5cdfc0a6" have entirely different histories.

3 changed files with 1 additions and 1150 deletions

1145
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -10,7 +10,6 @@
"author": "", "author": "",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"cors": "^2.8.5",
"@ztimson/utils": "^0.21.6", "@ztimson/utils": "^0.21.6",
"express": "^4.21.1", "express": "^4.21.1",
"i2c-bus": "^5.2.3", "i2c-bus": "^5.2.3",

View File

@ -1,4 +1,3 @@
import cors from 'cors';
import express from 'express'; import express from 'express';
import path from 'path'; import path from 'path';
import APOLLO from './apollo.js'; import APOLLO from './apollo.js';
@ -14,9 +13,7 @@ export default class Daemon {
this.express = express(); this.express = express();
this.express.use(cors('*')); this.express.get('/api/*', async (req, res) => {
this.express.get('/api/*', async (req, res) => {
const cmd = req.params['0']; const cmd = req.params['0'];
res.json(await this.run(cmd)); res.json(await this.run(cmd));
}); });