Node JS Error: ENOENT

前端 未结 6 1465
Happy的楠姐
Happy的楠姐 2020-12-05 01:27

I\'m following along with: The Node Beginner Book

After testing with the code from another SO post:

var Fs = require(\'fs\');

var dirs = [\'tmp\'];         


        
6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-05 02:12

    You can include a different jade file into your template, that to from a different directory

    views/
         layout.jade
    static/
         page.jade
    

    To include the layout file from views dir to static/page.jade

    page.jade

    extends ../views/layout
    

提交回复
热议问题