Skip to content

Commit

Permalink
Fix issue with MEMCACHE_URL (GoogleCloudPlatform#61) (GoogleCloudPlat…
Browse files Browse the repository at this point in the history
…form#71)

* Fix issue with MEMCACHE_URL

* Fix other files as well
  • Loading branch information
Ace Nassri authored Sep 19, 2016
1 parent 6ba7453 commit c6d2f4a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
6 changes: 5 additions & 1 deletion 4-auth/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
var nconf = module.exports = require('nconf');
var path = require('path');

// Memcache configuration settings
var MEMCACHE_HOST = process.env.MEMCACHE_PORT_11211_TCP_ADDR || 'localhost';
var MEMCACHE_PORT = process.env.MEMCACHE_PORT_11211_TCP_PORT || 11211;

nconf
// 1. Command-line arguments
.argv()
Expand Down Expand Up @@ -55,7 +59,7 @@ nconf
GCLOUD_PROJECT: '',

// Connection url for the Memcache instance used to store session data
MEMCACHE_URL: '127.0.0.1:11211',
MEMCACHE_URL: MEMCACHE_HOST + ':' + MEMCACHE_PORT,

// MongoDB connection string
// https://docs.mongodb.org/manual/reference/connection-string/
Expand Down
6 changes: 5 additions & 1 deletion 5-logging/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
var nconf = module.exports = require('nconf');
var path = require('path');

// Memcache configuration settings
var MEMCACHE_HOST = process.env.MEMCACHE_PORT_11211_TCP_ADDR || 'localhost';
var MEMCACHE_PORT = process.env.MEMCACHE_PORT_11211_TCP_PORT || 11211;

nconf
// 1. Command-line arguments
.argv()
Expand Down Expand Up @@ -55,7 +59,7 @@ nconf
GCLOUD_PROJECT: '',

// Connection url for the Memcache instance used to store session data
MEMCACHE_URL: '127.0.0.1:11211',
MEMCACHE_URL: MEMCACHE_HOST + ':' + MEMCACHE_PORT,

// MongoDB connection string
// https://docs.mongodb.org/manual/reference/connection-string/
Expand Down
6 changes: 5 additions & 1 deletion 6-pubsub/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
var nconf = module.exports = require('nconf');
var path = require('path');

// Memcache configuration settings
var MEMCACHE_HOST = process.env.MEMCACHE_PORT_11211_TCP_ADDR || 'localhost';
var MEMCACHE_PORT = process.env.MEMCACHE_PORT_11211_TCP_PORT || 11211;

nconf
// 1. Command-line arguments
.argv()
Expand Down Expand Up @@ -57,7 +61,7 @@ nconf
GCLOUD_PROJECT: '',

// Connection url for the Memcache instance used to store session data
MEMCACHE_URL: '127.0.0.1:11211',
MEMCACHE_URL: MEMCACHE_HOST + ':' + MEMCACHE_PORT,

// MongoDB connection string
// https://docs.mongodb.org/manual/reference/connection-string/
Expand Down
6 changes: 5 additions & 1 deletion 7-gce/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
var nconf = module.exports = require('nconf');
var path = require('path');

// Memcache configuration settings
var MEMCACHE_HOST = process.env.MEMCACHE_PORT_11211_TCP_ADDR || 'localhost';
var MEMCACHE_PORT = process.env.MEMCACHE_PORT_11211_TCP_PORT || 11211;

nconf
// 1. Command-line arguments
.argv()
Expand Down Expand Up @@ -57,7 +61,7 @@ nconf
GCLOUD_PROJECT: '',

// Connection url for the Memcache instance used to store session data
MEMCACHE_URL: '127.0.0.1:11211',
MEMCACHE_URL: MEMCACHE_HOST + ':' + MEMCACHE_PORT,

// MongoDB connection string
// https://docs.mongodb.org/manual/reference/connection-string/
Expand Down

0 comments on commit c6d2f4a

Please sign in to comment.