Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document: Anything other than express-generator defaults, and Lockit fails to render #46

Open
dennishall1 opened this issue Feb 23, 2016 · 0 comments

Comments

@dennishall1
Copy link

Lockit says it "comes with its own built-in views". This is sort-of correct. It is only correct if your express app uses the default view engine (jade). Lockit could actually render its own views with its own view-engine, independently of the main app. It might suffice to better document how to use your own views, and warn people that you will have to create custom views if you are not using jade as your view engine.

express --hbs --css stylus myapp
cd myapp && npm i
npm i lockit cookie-session

edit app.js to include

var cookieSession = require('cookie-session');
var Lockit = require('lockit');
var lockit = new Lockit();
...
app.use(cookieSession({secret: 'my super secret String'}));
app.use(lockit.router);

Visit localhost:3000/login

ERROR
Failed to lookup view "/Users/dhall/projects/myapp/node_modules/lockit/node_modules/lockit-login/views/get-login" in views directory "/Users/dhall/projects/myapp/views"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant