In Meteor I've been looking for a way to get the home folder of the running Meteor application in Server.
For example, if my .meteor
folder is in C:/Users/Me/Repos/MyWebsite/.meteor
, is there a way to get the path C:/Users/Me/Repos/MyWebsite/
, or where ever the app is currently running at?
The reason I am asking this is because I am running some scripts with my webapp, and if the script (let's call it script.rb) is in a folder called util
in the Meteor home folder, I have to hardcode the entire path C:/Users/Me/Repos/MyWebsite/utils/script.rb
Is there a better way to do this?
As a side note, this must all be made server side.
You are here:
projectRoot/.meteor/local/build/programs/server/shell-server.js
So, to reference a script that lives in a sibling folder of your project, it'll look something like this:
../../../../../../scriptFolder/script.rb