查询了一些资料,我使用nodejs的object作为配置文件,首先定义一个module config.js:

var config =
    {
        uploadPath: "E:\\"
    };
module.exports = config;

然后在调用出引进该模块:

config = require('config');
uploadDir = config['uploadPath'];

 

相关文章:

  • 2021-10-28
  • 2021-08-07
  • 2022-03-10
  • 2022-12-23
  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
  • 2021-06-09
猜你喜欢
  • 2021-11-12
  • 2021-09-12
  • 2021-05-31
  • 2021-09-11
  • 2021-10-24
  • 2021-05-22
相关资源
相似解决方案