diff --git a/server.js b/server.js index 1ea09ad..d070a2c 100644 --- a/server.js +++ b/server.js @@ -6,8 +6,9 @@ import { Sequelize, DataTypes } from "sequelize"; import { fileURLToPath } from "url"; import { handler as ssrHandler } from "./dist/server/entry.mjs"; import multer from "multer"; -import config from "./config.json" assert { type: "json" }; +import fs from "fs"; +const config = JSON.parse(fs.readFileSync("config.json", "utf8")); const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const app = express(); diff --git a/test_upload.js b/test_upload.js index 79a1b25..cb36245 100644 --- a/test_upload.js +++ b/test_upload.js @@ -1,8 +1,9 @@ // This is a test file to upload files to the Nebula server import { FormData, File } from "formdata-node"; import { fileFromPath } from "formdata-node/file-from-path"; -import config from "./config.json" assert { type: "json" }; +import fs from "fs"; +const config = JSON.parse(fs.readFileSync("config.json", "utf8")); const form = new FormData(); // const file = new File(["My hovercraft is full of eels"], "example.txt");