{"id":15013422,"url":"https://github.com/veliovgroup/meteor-root","last_synced_at":"2025-04-12T04:43:14.233Z","repository":{"id":30273759,"uuid":"33825225","full_name":"veliovgroup/Meteor-root","owner":"veliovgroup","description":"[Server] ☄️ Get path on a server where Meteor application is currently running","archived":false,"fork":false,"pushed_at":"2022-05-30T08:39:13.000Z","size":322,"stargazers_count":20,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-20T17:12:42.595Z","etag":null,"topics":["javascript","meteor","meteor-package","meteorjs","nodejs"],"latest_commit_sha":null,"homepage":"https://atmospherejs.com/ostrio/meteor-root","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"comp4711TeamMJ/starter-todo4","license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/veliovgroup.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"dr-dimitru","custom":"https://paypal.me/veliovgroup"}},"created_at":"2015-04-12T16:55:47.000Z","updated_at":"2024-06-03T16:28:58.000Z","dependencies_parsed_at":"2022-09-22T00:03:55.607Z","dependency_job_id":null,"html_url":"https://github.com/veliovgroup/Meteor-root","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veliovgroup%2FMeteor-root","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veliovgroup%2FMeteor-root/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veliovgroup%2FMeteor-root/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veliovgroup%2FMeteor-root/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/veliovgroup","download_url":"https://codeload.github.com/veliovgroup/Meteor-root/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239918782,"owners_count":19718403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","meteor","meteor-package","meteorjs","nodejs"],"created_at":"2024-09-24T19:44:15.935Z","updated_at":"2025-02-20T21:30:56.478Z","avatar_url":"https://github.com/veliovgroup.png","language":"JavaScript","funding_links":["https://github.com/sponsors/dr-dimitru","https://paypal.me/veliovgroup","https://github.com/sponsors/veliovgroup"],"categories":[],"sub_categories":[],"readme":"[![support](https://img.shields.io/badge/support-GitHub-white)](https://github.com/sponsors/veliovgroup)\n[![support](https://img.shields.io/badge/support-PayPal-white)](https://paypal.me/veliovgroup)\n\u003ca href=\"https://ostr.io/info/built-by-developers-for-developers\"\u003e\n  \u003cimg src=\"https://ostr.io/apple-touch-icon-60x60.png\" height=\"20\"\u003e\n\u003c/a\u003e\n\n# Meteor.rootPath\n\nGet the path to currently running instance of *Meteor* application on a __server__.\n\n__Features:__\n\n- 🤓 Compatibility with Windows, Linux, and MacOS environments;\n- 👨‍💻 Globally available `Meteor.rootPath` — absolute path to `programs/server` directory;\n- 👨‍💻 Globally available `Meteor.absolutePath` — absolute path to `.meteor` directory.\n\n![meteor-root atmosphere library](https://raw.githubusercontent.com/veliovgroup/Meteor-root/master/meteor-root.jpg)\n\n## Installation\n\n```shell\nmeteor add ostrio:meteor-root\n```\n\n## Usage\n\n```js\nconst pathToFile = `${Meteor.rootPath}/directory/where/is/your/file.json`;\n```\n\nReturns absolute path to `programs/server` directory of your compiled application, without trailing slash.\n\n```js\nconst pathToFile = `${Meteor.absolutePath}/.meteor/local/build/programs/server/directory/where/is/your/file.json`;\n```\n\nReturns absolute path to `.meteor` directory of your compiled application, without trailing slash.\n\n__Note__: Be aware of the path stored in `Meteor.absolutePath`, it points to the location where Meteor application is running. It isn't guaranteed to be the same path as the path of your project. For example, running Meteor in test-mode will return a path from a temporary location where it's running.\n\n## Special thanks\n\n- Thanks to [@Konard](https://github.com/Konard) for testing and maintaining Windows support.\n\n## Testing\n\n1. Clone this package\n2. In Terminal (*Console*) go to directory where package is cloned\n3. Then run:\n\n```shell\n# Default\nmeteor test-packages ./\n\n# With custom port\nmeteor test-packages ./ --port 8888\n\n# With local MongoDB and custom port\nMONGO_URL=\"mongodb://127.0.0.1:27017/meteor-root-test\" meteor test-packages ./ --port 8888\n```\n\n## Support this project:\n\n- Star on [GitHub](https://github.com/veliovgroup/Meteor-root)\n- Star on [Atmosphere](https://atmospherejs.com/ostrio/meteor-root)\n- [Sponsor maintainer via GitHub](https://github.com/sponsors/dr-dimitru) — support open source with one-time contribution or on a regular basis\n- [Sponsor veliovgroup via GitHub](https://github.com/sponsors/veliovgroup) — support company behind this package\n- [Support via PayPal](https://paypal.me/veliovgroup) — support our open source contributions\n- Use [ostr.io](https://ostr.io) — [Monitoring](https://snmp-monitoring.com), [Analytics](https://ostr.io/info/web-analytics), [WebSec](https://domain-protection.info), [Web-CRON](https://web-cron.info) and [Pre-rendering](https://prerendering.com) for a website\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveliovgroup%2Fmeteor-root","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fveliovgroup%2Fmeteor-root","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveliovgroup%2Fmeteor-root/lists"}