I\'m trying to start serving some static web pages using connect
like this:
var connect = require(\"connect\");
var nowjs = require(\"now\");
va
You typically want to render templates like this:
app.get('/', function(req, res){
res.render('index.ejs');
});
However you can also deliver static content - to do so use:
app.use(express.static(__dirname + '/public'));
Now everything in the /public directory of your project will be delivered as static content at the root of your site e.g. if you place default.htm in the public folder if will be available by visiting /default.htm
Take a look through the express API and Connect Static middleware docs for more info.