Prep for bluemix deployment

This commit is contained in:
Martin Donnelly 2016-08-25 12:02:59 +01:00
parent bac675edcd
commit 9d93f54621
2 changed files with 16 additions and 1 deletions

View File

@ -84,7 +84,9 @@ var mqttClient = function() {
var address = '.messaging.internetofthings.ibmcloud.com';
var appKey = '9txJEf3Cjy7hkSOvkv';
var prefix = 'iot-2/type/mDot/id/';
var deviceId = ['CENSIS-LoRa-1','CENSIS-LoRa-2','CENSIS-LoRa-3','CENSIS-LoRa-4','HIE-mobile-1','HIE-mobile-2','HIE-smart-campus-1','HIE-smart-campus-2','HIE-smart-campus-3','HIE-smart-campus-4','HIE-smart-campus-5','HIE-smart-campus-6','HIE-smart-campus-7','HIE-mDot-1'];
//var deviceId = ['CENSIS-LoRa-1','CENSIS-LoRa-2','CENSIS-LoRa-3','CENSIS-LoRa-4','HIE-mobile-1','HIE-mobile-2','HIE-smart-campus-1','HIE-smart-campus-2','HIE-smart-campus-3','HIE-smart-campus-4','HIE-smart-campus-5','HIE-smart-campus-6','HIE-smart-campus-7','HIE-mDot-1'];
var deviceId = ['CENSIS-LoRa-1','CENSIS-LoRa-2','CENSIS-LoRa-3','CENSIS-LoRa-4','HIE-mobile-1----','HIE-mobile-2----','HIE-smart-campus-1','HIE-smart-campus-2','HIE-smart-campus-3','HIE-smart-campus-4','HIE-smart-campus-5','HIE-smart-campus-6','HIE-smart-campus-7','HIE-mDot-1'];
//Var subscribeTopic = prefix + deviceId + '/evt/+/fmt/json';

View File

@ -9,6 +9,7 @@
var pgp = require('pg-promise')();
/*
var cn = {
host: 'localhost',
port: 5432,
@ -16,6 +17,18 @@ var cn = {
user: 'postgres',
password: ''
};
*/
// ElephantSql settings
var cn = {
host: 'qdjjtnkv.db.elephantsql.com',
port: 5432,
database: 'gxwxnqoh',
user: 'gxwxnqoh',
password: 'LN5Uk39GNcBCxCHv5dfL8aKuowFT6WKG'
};
exports.dbConnection = pgp(cn);