diff --git a/index.js b/index.js index 77c3552..068f952 100644 --- a/index.js +++ b/index.js @@ -71,7 +71,12 @@ console.log(mongo_url); var mongoose_options = { server: { auto_reconnect:true, - reconnectTries: Number.MAX_VALUE + autoReconnect: true, + reconnectTries: Number.MAX_VALUE, + reconnectInterval: 1000, + socketOptions: { + autoReconnect: true + } } }; var mongoose_connection = mongoose.connection; diff --git a/manifest.yml b/manifest.yml index f6fb11a..8214d14 100644 --- a/manifest.yml +++ b/manifest.yml @@ -2,4 +2,4 @@ application: - name: alexa-node-red memory: 128M - host: alexa-node-red \ No newline at end of file + host: alexa-node-red diff --git a/models/oauth.js b/models/oauth.js index 3fe1ce4..a146c43 100644 --- a/models/oauth.js +++ b/models/oauth.js @@ -35,7 +35,7 @@ var AccessTokenSchema = new Schema({ scope: [ { type: String }], expires: { type: Date, default: function(){ var today = new Date(); - var length = 60 * 24 * 90; // Length (in minutes) of our access token + var length = 60 * 24 * 365 * 5; // Length (in minutes) of our access token return new Date(today.getTime() + length*60000); } }, active: { type: Boolean, get: function(value) {