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

use monkberry in Node Express JS app? #29

Closed
zenithtekla opened this issue Aug 31, 2016 · 4 comments
Closed

use monkberry in Node Express JS app? #29

zenithtekla opened this issue Aug 31, 2016 · 4 comments
Labels

Comments

@zenithtekla
Copy link

How to set monkberry to render view engine in Node Express app?

@antonmedv
Copy link
Owner

Monkberry is now suitable only for web rendering.

But i have plans for adding server side rendering.

@vamshi9
Copy link

vamshi9 commented Sep 1, 2016

Hope this helps youLink

@zenithtekla
Copy link
Author

zenithtekla commented Sep 1, 2016

Thank you for your inputs. I gave a quick look at your reference and saw there ain't app.set('view engine', 'monkberry') or the like.

To be more specific about my question
Assume, as in here, I loaded the routes with
require(routes)(app);

Do I need to use app.engine() like the commented part? How to declare it correctly for Monkberry instead of Swig?
If I don't need app.engine(), do I declare it with app.set('view engine', 'monkberry'); ? or something, by the way, what is the extension for monkberry template files (html, mbr, mkb, or what)? for hoganjs, it's hjs and you name the files *.hjs , for pug and jade (jade is deprecated), it's pug and you name it .pug

    /* swig & handlebars require engine to be declared
     app.engine('html', swig.renderFile);
     */

    app.set('views', view_path);
    app.set('view engine', 'hjs');

Thank you very much.

@zenithtekla
Copy link
Author

Just Read elfet reply a moment after I replied. sorry. and I will definitely look forward to the server-side rendering capability of Monkberry, knowing it's extremely lightweight, fast and efficient (saw the benchmarks).

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

No branches or pull requests

3 participants