-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
32 lines (28 loc) · 881 Bytes
/
app.js
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
var express = require('express')
, fs = require('fs')
, http = require('http')
, path = require('path')
, app = express()
, server = null
, server = http.createServer(app)
app.configure(function () {
app.set('views', __dirname + '/client/');
app.use(express.favicon());
app.use(express.logger('dev'));
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(app.router);
app.use(express.static(path.join(__dirname, 'public')));
app.set('view engine', 'html');
// app.use("/js", express.static(__dirname + '/public/js'));
});
app.configure('development', function () {
app.use(express.errorHandler());
});
app.get("/", function(req, res){
res.sendfile(__dirname + '/client/index.html');
});
//start the server
server.listen(3000, function () {
console.log("Express server listening on port: " + 3000);
});