如何运行index.jade文件? [英] How do I run a index.jade file?

查看:105
本文介绍了如何运行index.jade文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试学习HTML5并下载了测试项目 https://github.com/amiklosi/Comicr .有一个名为views的文件夹,带有index.jade,我想它是起始页.运行该类型的文件需要什么?我无法直接在浏览器中打开它.

Trying to learn HTML5 and downloaded a test project https://github.com/amiklosi/Comicr. There is a folder named views with a index.jade which I suppose is the start page. What does it take to run that type of files? I can not open it directly in the browser.

推荐答案

jade 是HTML模板引擎.所有玉器文件都需要在HTML中进行转换.

jade is a HTML templating engine. All jade files need to be transformed in the HTML.

您需要通过运行安装才能安装玉器

You need to install to install jade by running

npm install jade

也不要忘记您需要安装其他依赖项,例如express,nodemailer等(请参见

Also don't forget that you need to install other dependencie like express, nodemailer, etc (see requires in the source code).

然后使用

node app.js

该应用程序应该可以在 http://localhost/3000 上使用.所有Jade模板都将正确呈现并显示为HTML.

And the application should by available on http://localhost/3000. All Jade templates will be correctly rendered and displayed as HTML.

这篇关于如何运行index.jade文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆