Преглед изворни кода

feat: 添加.env文件解析

河畔一角 пре 6 дана
родитељ
комит
e3fac1776e
2 измењених фајлова са 6 додато и 1 уклоњено
  1. 1 1
      .gitignore
  2. 5 0
      config.js

+ 1 - 1
.gitignore

@@ -12,4 +12,4 @@ packages/**/*/node_modules
 .DS_Store
 /dist
 /deploy.js
-/config.js
+.env

+ 5 - 0
config.js

@@ -0,0 +1,5 @@
+const config = require('dotenv').config();
+
+console.log('当前配置:', config.parsed);
+
+module.exports = config.parsed || {};