I see that a lot of people are using this module for using Node along with a mysql database: node-mysql
In everything I read people are storing their passwording and usernames in plain text in the js file. Javascript files can be read pretty easily, so isn't this a terrible thing?
Here is the connection code in the docs:
var connection = mysql.createConnection({
host : 'localhost',
user : 'me',
password : 'secret'
});
Am I missing a piece of the puzzle that disallows people from viewing your JS file on the server in plain text, password fully available?