meteor-client-bundler icon indicating copy to clipboard operation
meteor-client-bundler copied to clipboard

Need to pass --settings parameter to be able to access public settings on the client

Open darkbasic opened this issue 7 years ago • 5 comments

I tried to set an evironment variable just in case:

{
  "runtime": {
    "DDP_DEFAULT_CONNECTION_URL": "http://domain.tld:3000",
    "ROOT_URL": "http://domain.tld:80",
    "METEOR_SETTINGS": "{\"public\": {\"facebook\": {\"permissions\": [\"basic_info\", \"user_interests\", \"user_activities\", \"read_friendlists\"], \"profileFields\": [\"name\", \"gender\", \"location\"]}}}"
  },
  "import": [

  ]
}

but obviously it didn't work because meteor expects a --settings parameter and doesn't work with an environment variable.

darkbasic avatar May 05 '17 17:05 darkbasic

By the way I don't think that having to specify a settings parameter a second time in the client is a good design decision. Meteor should probably publish public settings using DDP instead. I don't know the innings so excuse me if I don't know how it's supposed to work.

darkbasic avatar May 05 '17 17:05 darkbasic

@darkbasic Did you figure it out how to pass settings to the bundler?

lnmunhoz avatar Jun 30 '17 19:06 lnmunhoz

No, unfortunately I didn't look at a possible solution, I just worked it around.

darkbasic avatar Jul 19 '17 10:07 darkbasic

https://github.com/Urigo/Ionic2CLI-Meteor-WhatsApp/issues/73#issuecomment-352637869

Can I add this if anyone is interested?

bo01ean avatar Dec 19 '17 04:12 bo01ean

try this

{
    "runtime": {
    "DDP_DEFAULT_CONNECTION_URL": "http://domain.tld:3000",
        "ROOT_URL": "http://domain.tld:80",
        "PUBLIC_SETTINGS": {
        "facebook": {
            "permissions": ["basic_info", "user_interests", "user_activities", "read_friendlists"],
            "profileFields": ["name", "gender", "location"]
        }
    }
},
    "import": []
}

AlexeyZebka avatar Sep 10 '18 07:09 AlexeyZebka