Easier way to run meteor with settings than typing meteor --settings file.json

I am really starting to hate having to type in meteor --settings settings.json all the time. Is there an easier way to run meteor with the settings file when developing locally?

You can create a bash script or if you are using Atom as your editor, you can use the Meteor Helper package https://atom.io/packages/meteor-helper to run meteor with your settings. :wink:

1 Like

You can also use iron-cli, but it may as well be an overkill if you don’t need/want extra functionality.

1 Like

An npm script in package.json will work for something like this.
"scripts": { "start": "meteor run", "dev": "meteor --settings settings.json" },
Then in your terminal just type npm run dev to start your app.


I would love to use this solution but there’s a long standing bug due which causes 100% cpu when running Meteor from the NPM script block — https://github.com/meteor/meteor/issues/4314

I’ve started using foreman and a Procfile like this:

web: meteor --settings ../settings/development.json
test: meteor test --driver-package practicalmeteor:mocha --port 3100 --settings ../settings/test.json

So foreman start runs both processes whereas foreman web will just start Meteor.

1 Like

The meteor helper package is what I went with since I’m using atom :).

1 Like