Skip to content

Instantly share code, notes, and snippets.

@rdegges
Created September 23, 2015 18:11
Show Gist options
  • Save rdegges/54f530ecdc5d31fa07df to your computer and use it in GitHub Desktop.
Save rdegges/54f530ecdc5d31fa07df to your computer and use it in GitHub Desktop.
Raw express.
var express = require('express');
var stormpath = require('express-stormpath');
var morgan = require('morgan');
var app = express();
app.use(morgan('combined'));
stormpath.init(app, {
client: {
apiKey: {
id: 'xxx',
secret: 'yyy'
}
},
application: {
href: '/applications/xxx'
},
website: true
});
app.get('/', stormpath.loginRequired, function(req, res) {
res.send('YOU ARE LOGGED IN!');
});
app.on('stormpath.ready', function() {
console.log('RUNNING');
app.listen(3000);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment