V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
firhome
V2EX  ›  Node.js

请教一下不用框架 jade 怎么使用?

  •  
  •   firhome · 2016-07-08 16:22:17 +08:00 · 2126 次点击
    这是一个创建于 2848 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我现在用法如下:
    var fn = jade.renderFile('./tmpl/index.jade',{
    cache:true,
    pretty:true
    },function(err,html){
    response.writeHead(200, {"Content-Type": "text/html"});
    console.log(html);
    response.write(html);
    response.end();
    });

    console.log 能正常显示,但是 页面一直在加载。 因为html里加个不存在的css,请问这种情况该怎么办呢?页面直接白屏的

    另外问一下。 jade. renderFile 和 jade. compileFile 什么区别呢?
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5156 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 09:35 · PVG 17:35 · LAX 02:35 · JFK 05:35
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.