Render basic HTML view?

express, html, javascript, mongodb, node.js

Solution

You can have jade include a plain HTML page:

in views/index.jade

include plain.html

in views/plain.html

<!DOCTYPE html>
...

and app.js can still just render jade:

res.render(index)

Problem

I have a basic Node.js app that I am trying to get off the ground using the Express framework. I have a `views` folder where I have an `index.html` file. But I receive the following error when loading the web page: ``` Error: Cannot find module 'html' ``` Below is my code. ``` var express = require('express'); var app = express.createServer(); app.use(express.staticProvider(__dirname + '/public')); app.get('/', function(req, res) { res.render('index.html'); }); app.listen(8080, '127.0.0.1') ``` What am I missing here?

Original source

Related problems