Skip to content

Instantly share code, notes, and snippets.

@rdegges
Last active September 19, 2016 17:47
Show Gist options
  • Save rdegges/77828f00e312be9ab7f5c98b4e08952e to your computer and use it in GitHub Desktop.
Save rdegges/77828f00e312be9ab7f5c98b4e08952e to your computer and use it in GitHub Desktop.
express-stormpath-s3 initialization
'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