Skip to content

Commit

Permalink
Force add two test users
Browse files Browse the repository at this point in the history
  • Loading branch information
lmarkus committed Dec 31, 2013
1 parent db93989 commit 2ca013e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,26 @@ var kraken = require('kraken-js'),
app.configure = function configure(nconf, next) {
// Async method run on startup.
db.config(nconf.get('databaseConfig'));

//Add two users to the system.
var u1 = new User({
name: 'Kraken McSquid',
login: 'kraken',
password: 'releaseMe',
role: 'admin'
});

var u2 = new User({
name: 'Ash Williams',
login: 'awilliams',
password: 'boomstick',
role: 'user'
});

//Ignore errors. In this case, the errors will be for duplicate keys as we run this app more than once.
u1.save();
u2.save();

//Tell passport to use our newly created local strategy for authentication
passport.use(auth.localStrategy());

Expand Down

0 comments on commit 2ca013e

Please sign in to comment.