This commit is contained in:
1
package-lock.json
generated
1
package-lock.json
generated
@@ -9,6 +9,7 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"body-parser": "^2.2.0",
|
||||||
"cheerio": "^1.1.2",
|
"cheerio": "^1.1.2",
|
||||||
"concurrently": "^9.2.0",
|
"concurrently": "^9.2.0",
|
||||||
"exceljs": "^4.4.0",
|
"exceljs": "^4.4.0",
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
"start": "concurrently \"node server.js\" \"node cron-runner.js\""
|
"start": "concurrently \"node server.js\" \"node cron-runner.js\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"body-parser": "^2.2.0",
|
||||||
"cheerio": "^1.1.2",
|
"cheerio": "^1.1.2",
|
||||||
"concurrently": "^9.2.0",
|
"concurrently": "^9.2.0",
|
||||||
"exceljs": "^4.4.0",
|
"exceljs": "^4.4.0",
|
||||||
|
|||||||
@@ -3,10 +3,11 @@ import path from "path";
|
|||||||
const app = express();
|
const app = express();
|
||||||
import fs from "fs/promises";
|
import fs from "fs/promises";
|
||||||
import { getCurrentInterval } from "./scheduleRules.js";
|
import { getCurrentInterval } from "./scheduleRules.js";
|
||||||
|
import bodyParser from "body-parser";
|
||||||
|
|
||||||
const PORT = process.env.PORT || 3000;
|
const PORT = process.env.PORT || 3000;
|
||||||
|
|
||||||
globalThis.File = class File {};
|
app.use(bodyParser.json());
|
||||||
|
|
||||||
app.get('/', async (_, res) => {
|
app.get('/', async (_, res) => {
|
||||||
const dataStr = await fs.readFile(path.join(process.cwd(), "db", "current.json"), "utf8");
|
const dataStr = await fs.readFile(path.join(process.cwd(), "db", "current.json"), "utf8");
|
||||||
|
|||||||
Reference in New Issue
Block a user