Skip to content

Commit

Permalink
examples: remove UPPYSERVER_ references
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Nov 20, 2019
1 parent 9abb4e2 commit e74690e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions examples/aws-companion/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ app.use(require('express-session')({
const options = {
providerOptions: {
google: {
key: process.env.COMPANION_GOOGLE_KEY || process.env.UPPYSERVER_GOOGLE_KEY,
secret: process.env.COMPANION_GOOGLE_SECRET || process.env.UPPYSERVER_GOOGLE_SECRET
key: process.env.COMPANION_GOOGLE_KEY,
secret: process.env.COMPANION_GOOGLE_SECRET
},
s3: {
getKey: (req, filename) =>
`whatever/${Math.random().toString(32).slice(2)}/${filename}`,
key: process.env.COMPANION_AWS_KEY || process.env.UPPYSERVER_AWS_KEY,
secret: process.env.COMPANION_AWS_SECRET || process.env.UPPYSERVER_AWS_SECRET,
bucket: process.env.COMPANION_AWS_BUCKET || process.env.UPPYSERVER_AWS_BUCKET,
region: process.env.COMPANION_AWS_REGION || process.env.UPPYSERVER_AWS_REGION,
key: process.env.COMPANION_AWS_KEY,
secret: process.env.COMPANION_AWS_SECRET,
bucket: process.env.COMPANION_AWS_BUCKET,
region: process.env.COMPANION_AWS_REGION,
endpoint: process.env.COMPANION_AWS_ENDPOINT
}
},
Expand Down
16 changes: 8 additions & 8 deletions examples/digitalocean-spaces/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ const companion = require('../../packages/@uppy/companion')
* - COMPANION_AWS_BUCKET - Your space's name.
*/

if (!process.env.COMPANION_AWS_REGION && !process.env.UPPYSERVER_AWS_REGION) throw new Error('Missing Space region, please set the COMPANION_AWS_REGION environment variable (eg. "COMPANION_AWS_REGION=ams3")')
if (!process.env.COMPANION_AWS_KEY && !process.env.UPPYSERVER_AWS_KEY) throw new Error('Missing access key, please set the COMPANION_AWS_KEY environment variable')
if (!process.env.COMPANION_AWS_SECRET && !process.env.UPPYSERVER_AWS_SECRET) throw new Error('Missing secret key, please set the COMPANION_AWS_SECRET environment variable')
if (!process.env.COMPANION_AWS_BUCKET && !process.env.UPPYSERVER_AWS_BUCKET) throw new Error('Missing Space name, please set the COMPANION_AWS_BUCKET environment variable')
if (!process.env.COMPANION_AWS_REGION) throw new Error('Missing Space region, please set the COMPANION_AWS_REGION environment variable (eg. "COMPANION_AWS_REGION=ams3")')
if (!process.env.COMPANION_AWS_KEY) throw new Error('Missing access key, please set the COMPANION_AWS_KEY environment variable')
if (!process.env.COMPANION_AWS_SECRET) throw new Error('Missing secret key, please set the COMPANION_AWS_SECRET environment variable')
if (!process.env.COMPANION_AWS_BUCKET) throw new Error('Missing Space name, please set the COMPANION_AWS_BUCKET environment variable')

// Prepare the server.
const PORT = process.env.PORT || 3452
Expand All @@ -33,10 +33,10 @@ app.use('/companion', companion.app({
endpoint: 'https://{region}.digitaloceanspaces.com',
getKey: (req, filename) => `uploads/${filename}`,

key: process.env.COMPANION_AWS_KEY || process.env.UPPYSERVER_AWS_KEY,
secret: process.env.COMPANION_AWS_SECRET || process.env.UPPYSERVER_AWS_SECRET,
bucket: process.env.COMPANION_AWS_BUCKET || process.env.UPPYSERVER_AWS_BUCKET,
region: process.env.COMPANION_AWS_REGION || process.env.UPPYSERVER_AWS_REGION
key: process.env.COMPANION_AWS_KEY,
secret: process.env.COMPANION_AWS_SECRET,
bucket: process.env.COMPANION_AWS_BUCKET,
region: process.env.COMPANION_AWS_REGION
}
},
server: { serverUrl: `localhost:${PORT}` }
Expand Down

0 comments on commit e74690e

Please sign in to comment.