electron-webapps / meteor-electron

Meteor Electron, the easiest way to create a desktop Meteor application
MIT License
326 stars 48 forks source link

How set configuration? #72

Open sajadabedi opened 8 years ago

sajadabedi commented 8 years ago

Hi. in document :

Configuration is possible via Meteor.settings.electron

But where do i create this file? and need any file extension eg json or js? Thank you.

rdickert commented 8 years ago

Just make a file called settings.json in your app root directory, paste in the settings as shown in the readme, and alter the json to reflect your app settings. You should then run the app with meteor --settings settings.json to have Meteor read your file.

DivXZero commented 8 years ago

I have attempted to create the Meteor.settings.electron file as well as the settings.json file as rdickert describes above, but I am met with "You must specify at least one build in Meteor.settings.electron". I am unable to find any information on where this file should be created, or what fields are required (such as build).

p3140 commented 8 years ago

Create the file settings.json in the root of your app. My settings look like this: { "electron": { "name": "MyApp", "title": "MyApp", "icon": { "darwin": "client/myapp.icns", "win32": "client/myapp.ico" }, "version": "0.1.0", "description": "A really cool app.", "height": 768, "width": 1024, "frame": true, "resizable": true, "runOnStartup": false } } then run meteor with meteor --settings settings.json

wallynm commented 8 years ago

Hey guys, readme.md should be updated @rdickert solution worked correctly but it isn't documented leading to missunderstood. Thanks!

rdickert commented 8 years ago

@wallynm great idea. I'll bet the repo owners would take a PR on the readme - might be a simple copy/paste :)