简体   繁体   中英

Node JS: How to set template engine in krakenjs

我不知道如何在海妖js中设置玉模板,任何人都可以帮助我。

Open your config/app.json, there´s "view engines". Uncomment it and add your own template module (you have to npm install it first of course). You may also have to change the "express" config to use Jade.

Below is an example of a config to use ejs as a view engine:

"view engines": {
    "html": {
        "module": "ejs",
        "renderer": "__express"
    }
},

"express": {
    "view engine": "html"
}

Source .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM