Find absolute base path of the project directory

后端 未结 7 1488
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-04 21:35

Until now we could get the absolute path of a file to open later as readStream with this code snippet:

var base = path.resolve(\'.\');
var file = base + \'/d         


        
7条回答
  •  青春惊慌失措
    2020-12-04 22:09

    Hey you do not need to hardcode like the above answers... take a look to This package

    After install it you can access the root path of your meteor just wih Meteor.rootPath

提交回复
热议问题