Last active
September 19, 2016 17:47
-
-
Save rdegges/77828f00e312be9ab7f5c98b4e08952e to your computer and use it in GitHub Desktop.
express-stormpath-s3 initialization
This file contains hidden or 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
'use strict'; | |
const express = require('express'); | |
const stormpath = require('express-stormpath'); | |
const stormpathS3 = require('express-stormpath-s3'); | |
let app = express(); | |
// Middleware here | |
app.use(stormpath.init(app, { | |
client: { | |
apiKey: { | |
id: 'xxx', | |
secret: 'xxx' | |
} | |
}, | |
application: { | |
href: 'xxx' | |
} | |
})); | |
app.use(stormpath.getUser); | |
app.use(stormpathS3({ | |
awsAccessKeyId: 'xxx', | |
awsSecretAccessKey: 'xxx', | |
awsBucket: 'xxx', | |
})); | |
// Routes here | |
app.listen(process.env.PORT || 3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment