Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ you can generate a filter set for that application:
var stormpathConfig = {
apiKeyId: 'YOUR_STORMPATH_API_KEY',
apiKeySecret: 'YOUR_STORMPATH_API_SECRET',
appHref: 'YOUR_STORMPATH_APP_HREF'
appHref: 'YOUR_STORMPATH_APP_HREF',
quiet: false // Optional. Use "quiet: true" to suppress console logging
};

var stormpathFilters = stormpathRestify.createFilterSet(stormpathConfig);
Expand Down Expand Up @@ -191,4 +192,4 @@ var stormpathFilters = stormpathRestify.createFilterSet({
// all your error are belong to me
}
});
```
```
10 changes: 7 additions & 3 deletions filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ function createFilterSet(_options){
userAgent: 'restify-stormpath/' + pkg.version + ' ' + 'restify/' + require('restify/package').version,
});
}
console.log('Initializing Stormpath');
if(!opts.quiet){
console.log('Initializing Stormpath');
}
self.getApplication = new Promise(function(resolve,reject){
self.spClient.getApplication(appHref,
function(err,app){
Expand All @@ -153,7 +155,9 @@ function createFilterSet(_options){
);
});
self.getApplication.then(function(app){
console.log('Using Stormpath application \'' + app.name + '\'');
if(!opts.quiet){
console.log('Using Stormpath application \'' + app.name + '\'');
}
});
self.getApplication.catch(function(err){
throw err;
Expand Down Expand Up @@ -182,4 +186,4 @@ function createFilterSet(_options){

module.exports = {
createFilterSet: createFilterSet
};
};