Updated program to take database connection information from environment variables.
This commit is contained in:
@@ -12,7 +12,13 @@ from email.mime.base import MIMEBase
|
|||||||
from email import encoders
|
from email import encoders
|
||||||
import couchdb
|
import couchdb
|
||||||
|
|
||||||
couch = couchdb.Server('https://admin:ams19230@couch.jkent.org:443/')
|
dbUserName = os.environ['COUCHDB_USERNAME']
|
||||||
|
dbPassword = os.environ['COUCHDB_PW']
|
||||||
|
dbURL = os.environ['COUCHDB_URL']
|
||||||
|
|
||||||
|
couch = couchdb.Server(dbURL)
|
||||||
|
couch.resource.credentials = (dbUserName, dbPassword)
|
||||||
|
|
||||||
database = couch['mortgage']
|
database = couch['mortgage']
|
||||||
|
|
||||||
module_directory = os.path.dirname(__file__)
|
module_directory = os.path.dirname(__file__)
|
||||||
|
|||||||
Reference in New Issue
Block a user