When working with an MVC framework like AngularJS, I've noticed that many examples store the database credentials in an app.constant property within an app.js file. Unfortunately, this method makes the credentials easily readable by users.
In my situation, I am connecting to Mongolab using a service from a mongolab.js file where my API key is defined. Since I do not have access to the Mongolab backend to encrypt the information, I am wondering what would be the best practice to handle this sensitive data securely. Any recommendations or resources for me to research on this topic?