ostrio:meteor-root

[Server] Get current path on your server, where is Meteor application is running


Keywords
javascript, meteor, meteor-package, meteorjs, nodejs
License
BSD-3-Clause
Install
meteor add ostrio:meteor-root@=1.0.4

Documentation

Meteor.rootPath

Get current path on your server, where is Meteor application is running

This package supports Windows. Thanks to @Konard.

Install:

meteor add ostrio:meteor-root

Usage:

var pathToFile = Meteor.rootPath + '/folder/where/is/your/file.json';

Returns absolute path to programs/server folder of your compiled application, without trailing slash

var pathToFile = Meteor.absolutePath + '/.meteor/local/build/programs/server/folder/where/is/your/file.json';

Returns absolute path to .meteor folder of your compiled application, without trailing slash