Skip to content

Commit

Permalink
fixup! example: fix aws-companion example
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Aug 3, 2022
1 parent 5c3f555 commit 16ae4ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion examples/aws-companion/package.json
Expand Up @@ -22,7 +22,7 @@
},
"private": true,
"engines": {
"node": ">=16.11.0"
"node": ">=16.15.0"
},
"scripts": {
"dev": "vite",
Expand Down
19 changes: 9 additions & 10 deletions examples/aws-companion/server.cjs
Expand Up @@ -2,8 +2,7 @@ const fs = require('node:fs')
const path = require('node:path')
const companion = require('@uppy/companion')

require('dotenv').config()

require('dotenv').config({ path: path.join(__dirname, '..', '..', '.env') })
const app = require('express')()

const DATA_DIR = path.join(__dirname, 'tmp')
Expand All @@ -27,14 +26,14 @@ const options = {
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,
secret: process.env.COMPANION_AWS_SECRET,
bucket: process.env.COMPANION_AWS_BUCKET,
region: process.env.COMPANION_AWS_REGION,
endpoint: process.env.COMPANION_AWS_ENDPOINT,
},
},
s3: {
getKey: (req, filename) => `whatever/${Math.random().toString(32).slice(2)}/${filename}`,
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,
},
server: { host: 'localhost:3020' },
filePath: DATA_DIR,
Expand Down

0 comments on commit 16ae4ad

Please sign in to comment.