forked from heroku/node-js-sample
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweb.js
More file actions
33 lines (22 loc) · 666 Bytes
/
web.js
File metadata and controls
33 lines (22 loc) · 666 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
var express = require('express');
var fs = require('fs');
var app = express()
app.configure( function() {
app.use(express.logger());
app.set('views', __dirname + '/client/views');
app.set("view options", {layout: false});
app.use(express.static(__dirname + '/client'));
//app.engine('html' , require('jade').__express);
});
//
// app.get('/', function(request, response) {
// response.send('Hello World 2!');
// });
app.get('/', function(request, response) {
// response.render('index.html');
response.sendfile('client/index.html');
});
var port = process.env.PORT || 5000;
app.listen(port, function() {
console.log("Listening on " + port);
});