-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #113 from laem/socket
Socket
- Loading branch information
Showing
28 changed files
with
712 additions
and
413 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import AWS from 'aws-sdk' | ||
|
||
export const BUCKET_NAME = process.env.BUCKET_NAME | ||
const S3_ENDPOINT_URL = process.env.S3_ENDPOINT_URL | ||
const ID = process.env.ACCESS_KEY_ID | ||
const SECRET = process.env.ACCESS_KEY | ||
|
||
// Create S3 service object | ||
export const s3 = new AWS.S3({ | ||
endpoint: S3_ENDPOINT_URL, | ||
credentials: { | ||
accessKeyId: ID, | ||
secretAccessKey: SECRET, | ||
}, | ||
}) | ||
|
||
export const testStorage = async () => { | ||
try { | ||
const data = await s3 | ||
.getObject({ | ||
Bucket: BUCKET_NAME, | ||
Key: 'yo.txt', | ||
}) | ||
.promise() | ||
|
||
console.log( | ||
`Successfully read test file from ${BUCKET_NAME} : S3 storage works.` | ||
) | ||
|
||
console.log(`<<${data.Body.toString('utf-8')}>>`) | ||
} catch (e) { | ||
console.log('Problem fetching S3 test object', e) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export default 'v2' | ||
export default 'v3' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
58204a2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
villes-plus – ./
villes-plus-git-master-laem.vercel.app
villes-plus-laem.vercel.app
villes-plus.vercel.app
villes.plus
www.villes.plus