How to obtain the location of the current module in Node.js without using “__dirname”?

后端 未结 0 526
别跟我提以往
别跟我提以往 2021-01-17 01:33

OK, in Node.js, when using module.exports you\'d use:

__dirname

To obtain the location of the current file.

For example,

相关标签:
回答
  • 消灭零回复
提交回复
热议问题