diff --git a/utils/generateToken.js b/utils/generateToken.js new file mode 100644 index 00000000..61e3c3d6 --- /dev/null +++ b/utils/generateToken.js @@ -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);