From 6fc9113e4f1311a7f84ab7ebc2f98e43f0442450 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Wed, 26 Apr 2023 01:40:12 +0000 Subject: [PATCH] use experimental import assertion, requires nodejs 18 or higher --- main.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.js b/main.js index dc1ff3e..5d2b541 100644 --- a/main.js +++ b/main.js @@ -4,8 +4,7 @@ import cookieParser from "cookie-parser"; import cors from "cors"; import helmet from "helmet"; import morgan from "morgan"; -//import { version as _version } from "./package.json"; -let api = {version: "0.0.1"}; +import api from "./package.json" assert {type: "json"}; import { pveAPIToken, listenPort, domain } from "./vars.js"; import { checkAuth, requestPVE, handleResponse, getDiskInfo } from "./pve.js";