Im using Meteor Up to deploy my app to Digital Ocean and Im using mLab as a database. This is working but I’ve currently got my database password stored in the MONGO_URL:
env: {
// TODO: Change to your app's url
// If you are using ssl, it needs to start with https://
ROOT_URL: 'http://www.MYSITE.com',
// MONGO_URL: 'mongodb://localhost/meteor',
MONGO_URL:
'mongodb://USER:PASSWORD@URL:PORT/meteor',
},
I obviously don’t want my password saved to my source control but I would like to save the rest of this file. Is there a way of accessing a password string without having it in the file?
I tried adding it to Meteor settings and calling it like so:
MONGO_URL: Meteor.settings.private.DB,
But I get an error:
ReferenceError: Meteor is not defined
I tried importing Meteor into mup.js but then I get this error:
(function (exports, require, module, __filename, __dirname) { import { Meteor } from 'meteor/meteor';
^^^^^^
SyntaxError: Unexpected token import