You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varconfig=require('./config.js');varLockit=require('lockit');varapp=express();app.use(cookieParser());app.use(cookieSession({secret: 'secret'}));varlockit=newLockit(config);app.use(lockit.router);// you now have all the routes like /login, /signup, etc.// and you can listen on events. For example 'signup'lockit.on('signup',function(user,res){console.log('a new user signed up');res.send('Welcome!');// set signup.handleResponse to 'false' for this to work});
When I started the server it complained that express was undefined, so I installed express via npm and added:
lockit no email config found. Check your database for tokens.
/Users/valmar/dev/node/todolist/node_modules/lockit/node_modules/lockit-signup/index.js:40
router.get(route, this.getSignup.bind(this));
^
TypeError: Cannot read property 'get' of undefined
at new module.exports (/Users/valmar/dev/node/todolist/node_modules/lockit/node_modules/lockit-signup/index.js:40:9)
at new module.exports (/Users/valmar/dev/node/todolist/node_modules/lockit/index.js:41:16)
at Object.<anonymous> (/Users/valmar/dev/node/todolist/server.js:12:14)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
The text was updated successfully, but these errors were encountered:
Ah, yes. Using the example did the trick. Also tried to add cookie-parser and cookie-session as dependencies in package.json but that didn't work :(
Anyway, thanks. I'll start with your example code then.
I tried the "full example" code:
When I started the server it complained that express was undefined, so I installed express via npm and added:
and changed:
to this:
But now I get this. What's wrong?
The text was updated successfully, but these errors were encountered: