rodrigocprates
rodrigocprates

Reputation: 566

Running Meteor Up how to choose settings file

I am using Meteor Up to deploy my app to production server.

For now I am configuring Meteor.settings through settings-dev.json and settings-prod.json for development and production environments.

I have two main doubts:

How can I run 'mup deploy' command from my machine and choose settings-prod.json?

Is this the best practice to configure my server and resource values using settings-[env].json to deploy my app?

Thanks

Upvotes: 4

Views: 1676

Answers (1)

user5084201
user5084201

Reputation:

Just use the default name /settings.json. It will work. When you execute mup init it will automatically create 2 files.

  • mup.json - Meteor Up configuration file

  • settings.json - Settings for Meteor's settings API

And yes it is a good idea to use settings.json. Just be careful to not insert any secret information inside "public": {}

For example:

{
  "public": {
     "publicKey": 'xxx' // available to the client
   },
   "oauthSecretKey": "xxx" // available to server only
}

Upvotes: 5

Related Questions