在Node.js中,您可以使用以下代码获取服务器根目录的路径: var path = require("path"); var appDir = path.dirname(require.main.filename); console.log(appDir);.
確定! 回上一頁