diff --git a/backend/src/main.js b/backend/src/main.js index 3ba7bf1..594f6ec 100644 --- a/backend/src/main.js +++ b/backend/src/main.js @@ -19,10 +19,6 @@ console.log( ┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅ `, ); -if ($.env.isNode) { - const dotenv = eval(`require("dotenv")`); - dotenv.config(); -} import migrate from '@/utils/migration'; import serve from '@/restful'; diff --git a/backend/src/vendor/open-api.js b/backend/src/vendor/open-api.js index 3c32b81..d73a0c7 100644 --- a/backend/src/vendor/open-api.js +++ b/backend/src/vendor/open-api.js @@ -18,6 +18,10 @@ export class OpenAPI { this.http = HTTP(); this.env = ENV(); + if (isNode) { + const dotenv = eval(`require("dotenv")`); + dotenv.config(); + } this.node = (() => { if (isNode) { const fs = eval("require('fs')");