How to use data in setting-development.json


#1

I have some data of setting-development.json like this:

{
“public”: {
“toppings”: {
“meats”: [
“Sausage”,
“Pepperoni”,
“Bacon”,
“Ham”,
“Beef”
],
“nonMeats”: [
“Banana Peppers”,
“Green Peppers”,
“Mushrooms”,
“Black Olives”,
“Onions”,
“Feta Cheese”,
“Jalapeno Peppers”,
“Pineapple”
]
},
“crusts”: [
“Regular”,
“Thin”,
“Deep Dish”,
“Pan”
],
“sauces”: [
“Tomato”,
“Roboust Tomato”,
“Alfredo”,
“Barbecue”
],
“sizes”: [
10,
12,
14,
16
]
}
}

But when I use in my build-pizza.js:

Template.buildPizza.helpers({
crusts: function(){
return Meteor.settings.public.crusts;
},
sauces: function(){
return Meteor.settings.public.sauces;
},
toppings: function(){
return Meteor.settings.public.toppings;
},
sizes: function(){
return Meteor.settings.public.sizes;
}
});

It don’t work. Please help me to fox it


#2

Did you start Meteor with

meteor --settings=setting-development.json

?


#3

Thank you very much. That right! :slight_smile: