Last active
December 12, 2015 10:09
-
-
Save jazlalli/4757499 to your computer and use it in GitHub Desktop.
config object for housing node-sqlserver connection string and its parsed elements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var config_development = {} | |
config_development.CLOUD_AMQP = 'amqp://127.0.0.1:5672'; | |
config_development.EXCHANGE_NAME = 'DataExchange'; | |
config_development.QUEUE_NAME = 'SqlSubscriberQueue'; | |
config_development.SQL = {}; | |
config_development.SQL.ConnectionString = 'Driver={SQL Server Native Client 10.0};Server=(local);Database=Reporting;Trusted_Connection={Yes}'; | |
var parsesqlconnectionstring = (function () { | |
var i, | |
properties = config_development.SQL.ConnectionString.split(';'), | |
propertycount = properties.length, | |
keyvalue; | |
for (i = 0; i < propertycount; i += 1) { | |
keyvalue = properties[i].split('='); | |
config_development.SQL[keyvalue[0]] = keyvalue[1]; | |
} | |
}()); | |
module.exports = config_development; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment