GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Merge pull request #39 from GoogleCloudPlatform/config · stackriot/nodejs-docs-samples@2b9ea17

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • 2-structured-data
    • config.js
  • 3-binary-data
    • config.js
  • 4-auth
    • config.js
  • 5-logging
    • config.js
  • 6-pubsub
    • config.js
  • 7-gce
    • config.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎2-structured-data/config.js‎

Copy file name to clipboardExpand all lines: 2-structured-data/config.js
+5-6Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
'use strict';
1515

16-
1716
module.exports = {
1817
port: process.env.PORT || 8080,
1918

@@ -29,13 +28,13 @@ module.exports = {
2928
},
3029

3130
mysql: {
32-
user: 'your-mysql-user',
33-
password: 'your-mysql-password',
34-
host: 'your-mysql-host'
31+
user: process.env.MYSQL_USER || 'your-mysql-user',
32+
password: process.env.MYSQL_PASSWORD || 'your-mysql-password',
33+
host: process.env.MYSQL_HOST || 'your-mysql-host'
3534
},
3635

3736
mongodb: {
38-
url: 'your-mongo-url',
39-
collection: 'your-mongo-collection'
37+
url: process.env.MONGO_URL || 'mongodb://localhost:27017',
38+
collection: process.env.MONGO_COLLECTION || 'books'
4039
}
4140
};
Collapse file

‎3-binary-data/config.js‎

Copy file name to clipboardExpand all lines: 3-binary-data/config.js
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ module.exports = {
2929
},
3030

3131
// Typically, you will create a bucket with the same name as your project ID.
32-
cloudStorageBucket: 'your-bucket-name',
32+
cloudStorageBucket: process.env.CLOUD_BUCKET || 'your-bucket-name',
3333

3434
mysql: {
35-
user: 'your-mysql-user',
36-
password: 'your-mysql-password',
37-
host: 'your-mysql-host'
35+
user: process.env.MYSQL_USER || 'your-mysql-user',
36+
password: process.env.MYSQL_PASSWORD || 'your-mysql-password',
37+
host: process.env.MYSQL_HOST || 'your-mysql-host'
3838
},
3939

4040
mongodb: {
41-
url: 'your-mongo-url',
42-
collection: 'your-mongo-collection'
41+
url: process.env.MONGO_URL || 'mongodb://localhost:27017',
42+
collection: process.env.MONGO_COLLECTION || 'books'
4343
}
4444
};
Collapse file

‎4-auth/config.js‎

Copy file name to clipboardExpand all lines: 4-auth/config.js
+10-10Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = {
1818
port: process.env.PORT || 8080,
1919

2020
// Secret is used by sessions to encrypt the cookie.
21-
secret: 'your-secret-here',
21+
secret: process.env.SESSION_SECRET || 'your-secret-here',
2222

2323
// dataBackend can be 'datastore', 'cloudsql', or 'mongodb'. Be sure to
2424
// configure the appropriate settings for each storage engine below.
@@ -32,26 +32,26 @@ module.exports = {
3232
},
3333

3434
// Typically, you will create a bucket with the same name as your project ID.
35-
cloudStorageBucket: 'your-bucket-name',
35+
cloudStorageBucket: process.env.CLOUD_BUCKET || 'your-bucket-name',
3636

3737
mysql: {
38-
user: 'your-mysql-user',
39-
password: 'your-mysql-password',
40-
host: 'your-mysql-host'
38+
user: process.env.MYSQL_USER || 'your-mysql-user',
39+
password: process.env.MYSQL_PASSWORD || 'your-mysql-password',
40+
host: process.env.MYSQL_HOST || 'your-mysql-host'
4141
},
4242

4343
mongodb: {
44-
url: 'your-mongo-url',
45-
collection: 'your-mongo-collection'
44+
url: process.env.MONGO_URL || 'mongodb://localhost:27017',
45+
collection: process.env.MONGO_COLLECTION || 'books'
4646
},
4747

4848
// The client ID and secret can be obtained by generating a new web
4949
// application client ID on Google Developers Console.
5050
oauth2: {
51-
clientId: 'your-client-id',
52-
clientSecret: 'your-client-secret',
51+
clientId: process.env.OAUTH_CLIENT_ID || 'your-client-id',
52+
clientSecret: process.env.OAUTH_CLIENT_SECRET || 'your-client-secret',
5353
redirectUrl: process.env.OAUTH2_CALLBACK ||
5454
'http://localhost:8080/oauth2callback',
5555
scopes: ['email', 'profile']
56-
},
56+
}
5757
};
Collapse file

‎5-logging/config.js‎

Copy file name to clipboardExpand all lines: 5-logging/config.js
+10-10Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = {
1818
port: process.env.PORT || 8080,
1919

2020
// Secret is used by sessions to encrypt the cookie.
21-
secret: 'your-secret-here',
21+
secret: process.env.SESSION_SECRET || 'your-secret-here',
2222

2323
// dataBackend can be 'datastore', 'cloudsql', or 'mongodb'. Be sure to
2424
// configure the appropriate settings for each storage engine below.
@@ -32,26 +32,26 @@ module.exports = {
3232
},
3333

3434
// Typically, you will create a bucket with the same name as your project ID.
35-
cloudStorageBucket: 'your-bucket-name',
35+
cloudStorageBucket: process.env.CLOUD_BUCKET || 'your-bucket-name',
3636

3737
mysql: {
38-
user: 'your-mysql-user',
39-
password: 'your-mysql-password',
40-
host: 'your-mysql-host'
38+
user: process.env.MYSQL_USER || 'your-mysql-user',
39+
password: process.env.MYSQL_PASSWORD || 'your-mysql-password',
40+
host: process.env.MYSQL_HOST || 'your-mysql-host'
4141
},
4242

4343
mongodb: {
44-
url: 'your-mongo-url',
45-
collection: 'your-mongo-collection'
44+
url: process.env.MONGO_URL || 'mongodb://localhost:27017',
45+
collection: process.env.MONGO_COLLECTION || 'books'
4646
},
4747

4848
// The client ID and secret can be obtained by generating a new web
4949
// application client ID on Google Developers Console.
5050
oauth2: {
51-
clientId: 'your-client-id',
52-
clientSecret: 'your-client-secret',
51+
clientId: process.env.OAUTH_CLIENT_ID || 'your-client-id',
52+
clientSecret: process.env.OAUTH_CLIENT_SECRET || 'your-client-secret',
5353
redirectUrl: process.env.OAUTH2_CALLBACK ||
5454
'http://localhost:8080/oauth2callback',
5555
scopes: ['email', 'profile']
56-
},
56+
}
5757
};
Collapse file

‎6-pubsub/config.js‎

Copy file name to clipboardExpand all lines: 6-pubsub/config.js
+10-10Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = {
1818
port: process.env.PORT || 8080,
1919

2020
// Secret is used by sessions to encrypt the cookie.
21-
secret: 'your-secret-here',
21+
secret: process.env.SESSION_SECRET || 'your-secret-here',
2222

2323
// dataBackend can be 'datastore', 'cloudsql', or 'mongodb'. Be sure to
2424
// configure the appropriate settings for each storage engine below.
@@ -32,26 +32,26 @@ module.exports = {
3232
},
3333

3434
// Typically, you will create a bucket with the same name as your project ID.
35-
cloudStorageBucket: 'your-bucket-name',
35+
cloudStorageBucket: process.env.CLOUD_BUCKET || 'your-bucket-name',
3636

3737
mysql: {
38-
user: 'your-mysql-user',
39-
password: 'your-mysql-password',
40-
host: 'your-mysql-host'
38+
user: process.env.MYSQL_USER || 'your-mysql-user',
39+
password: process.env.MYSQL_PASSWORD || 'your-mysql-password',
40+
host: process.env.MYSQL_HOST || 'your-mysql-host'
4141
},
4242

4343
mongodb: {
44-
url: 'your-mongo-url',
45-
collection: 'your-mongo-collection'
44+
url: process.env.MONGO_URL || 'mongodb://localhost:27017',
45+
collection: process.env.MONGO_COLLECTION || 'books'
4646
},
4747

4848
// The client ID and secret can be obtained by generating a new web
4949
// application client ID on Google Developers Console.
5050
oauth2: {
51-
clientId: 'your-client-id',
52-
clientSecret: 'your-client-secret',
51+
clientId: process.env.OAUTH_CLIENT_ID || 'your-client-id',
52+
clientSecret: process.env.OAUTH_CLIENT_SECRET || 'your-client-secret',
5353
redirectUrl: process.env.OAUTH2_CALLBACK ||
5454
'http://localhost:8080/oauth2callback',
5555
scopes: ['email', 'profile']
56-
},
56+
}
5757
};
Collapse file

‎7-gce/config.js‎

Copy file name to clipboardExpand all lines: 7-gce/config.js
+10-10Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = {
1818
port: process.env.PORT || 8080,
1919

2020
// Secret is used by sessions to encrypt the cookie.
21-
secret: 'your-secret-here',
21+
secret: process.env.SESSION_SECRET || 'your-secret-here',
2222

2323
// dataBackend can be 'datastore', 'cloudsql', or 'mongodb'. Be sure to
2424
// configure the appropriate settings for each storage engine below.
@@ -32,26 +32,26 @@ module.exports = {
3232
},
3333

3434
// Typically, you will create a bucket with the same name as your project ID.
35-
cloudStorageBucket: 'your-bucket-name',
35+
cloudStorageBucket: process.env.CLOUD_BUCKET || 'your-bucket-name',
3636

3737
mysql: {
38-
user: 'your-mysql-user',
39-
password: 'your-mysql-password',
40-
host: 'your-mysql-host'
38+
user: process.env.MYSQL_USER || 'your-mysql-user',
39+
password: process.env.MYSQL_PASSWORD || 'your-mysql-password',
40+
host: process.env.MYSQL_HOST || 'your-mysql-host'
4141
},
4242

4343
mongodb: {
44-
url: 'your-mongo-url',
45-
collection: 'your-mongo-collection'
44+
url: process.env.MONGO_URL || 'mongodb://localhost:27017',
45+
collection: process.env.MONGO_COLLECTION || 'books'
4646
},
4747

4848
// The client ID and secret can be obtained by generating a new web
4949
// application client ID on Google Developers Console.
5050
oauth2: {
51-
clientId: 'your-client-id',
52-
clientSecret: 'your-client-secret',
51+
clientId: process.env.OAUTH_CLIENT_ID || 'your-client-id',
52+
clientSecret: process.env.OAUTH_CLIENT_SECRET || 'your-client-secret',
5353
redirectUrl: process.env.OAUTH2_CALLBACK ||
5454
'http://localhost:8080/oauth2callback',
5555
scopes: ['email', 'profile']
56-
},
56+
}
5757
};

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.