Add `utils` dir and generateToken.js utility

Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
This commit is contained in:
Drasko DRASKOVIC 2015-12-05 19:04:42 +01:00
parent 469880a3fa
commit b930a8f75f
1 changed files with 9 additions and 0 deletions

9
utils/generateToken.js Normal file
View File

@ -0,0 +1,9 @@
var jwt = require('jsonwebtoken');
var config = require('../config/config');
var token = jwt.sign({foo: 'bar'}, config.tokenSecret, {
expiresInMinutes: config.userTokenExpirePeriod
});
console.log(token);