Is it possible to use debugOnly from outside of the packages


Hi, I need to generate a fake data for local development but this code should not be able to run on produciton

if (isDebug & isEmpty...) {



You can get the absoluteURL and see if it starts with “http://localhost”… anybody want to see that as a package?


Pretty sure that’s not how it works. debugOnly is for managing the importing of packages. @msavin offers a better solution… detect the url with Meteor.absoluteUrl and whether it’s empty with MyCollection.find().count().


Thanks for your answer, I think it should be a part of meteor core.
Something like: Meteor.environment = (production | development | testing)


Agree - was surprised when Meteor didn’t have this built in


Ok, what should I do next? Contact with someone from meteor core-team? Or create issue directly on github?