forked from couchbaselabs/try-cb-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
29 lines (22 loc) · 772 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
var express = require('express');
var app = express();
var config = require('./utils/config');
var path = require('path');
app.use(express.static(path.join(__dirname, 'public')));
require('./routes/routes')(app);
app.listen(config.application.httpPort);
var http = require('http'),
faye = require('faye');
var server = http.createServer(),
bayeux = new faye.NodeAdapter({mount: '/faye', timeout: 45});
bayeux.attach(server);
server.listen(8000);
//// ▶▶ uncaught exception - DEBUG only ◀◀ ////
/*
process.on('uncaughtException', function (err) {
console.log('Caught exception: ' + err);
console.log('Please confirm the couchbase instance: ',config.couchbase.endPoint,
'is running and accessible. ');
process.exit();
});
*/