Skip to content

Commit

Permalink
Update memcached sample (#619)
Browse files Browse the repository at this point in the history
* Update app.standard.yaml

* Update app.js

* Update app.flexible.yaml
  • Loading branch information
chenyumic authored May 23, 2018
1 parent 0f6c836 commit 5091a97
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
3 changes: 0 additions & 3 deletions appengine/memcached/app.flexible.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ env: flex
# anyone access to your memcached service. Do not add this file to your source
# control.
env_variables:
# If you are using the App Engine Memcache service (currently in alpha),
# uncomment this section and comment out the other Memcache variables.
# USE_GAE_MEMCACHE: 1
MEMCACHE_URL: your-memcache-url
# If you are using a Memcached server with SASL authentiation enabled,
# fill in these values with your username and password.
Expand Down
6 changes: 1 addition & 5 deletions appengine/memcached/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ const app = express();

// [START client]
// Environment variables are defined in app.yaml.
let MEMCACHE_URL = process.env.MEMCACHE_URL || '127.0.0.1:11211';

if (process.env.USE_GAE_MEMCACHE) {
MEMCACHE_URL = `${process.env.GAE_MEMCACHE_HOST}:${process.env.GAE_MEMCACHE_PORT}`;
}
let MEMCACHE_URL = process.env.MEMCACHE_URL;

const mc = memjs.Client.create(MEMCACHE_URL);
// [END client]
Expand Down
5 changes: 0 additions & 5 deletions appengine/memcached/app.standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ runtime: nodejs8
# anyone access to your memcached service. Do not add this file to your source
# control.
env_variables:
# If you are using the App Engine Memcache service,
# uncomment this section and comment out the other Memcache variables.
#USE_GAE_MEMCACHE: 1
#GAE_MEMCACHE_HOST: 35.190.255.1
#GAE_MEMCACHE_PORT: 11211
MEMCACHE_URL: your-memcache-url
# If you are using a Memcached server with SASL authentiation enabled,
# fill in these values with your username and password.
Expand Down

0 comments on commit 5091a97

Please sign in to comment.