-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
54 lines (40 loc) · 1.33 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Generated by CoffeeScript 1.3.3
(function() {
var app, async, db, express, jade, vimeo, vimeoConnect;
express = require('express');
jade = require('jade');
vimeo = require('./vimeo');
async = require('async');
db = require('mongojs').connect('vimeo', ['users']);
app = express();
vimeoConnect = vimeo.app({
APP_ID: 'b62d75bf5a4e0b0e5ae27acc9cae476e7000d0c5',
APP_SECRET: '9e14fd99e7852a313685ed9a057b0c4d2a2bf4f5',
CALLBACK_URL: 'http://localhost:3000/auth'
});
app.configure(function() {
app.set('view engine', 'jade');
app.set('views', "" + __dirname + "/views");
app.set('port', process.env.PORT || 3000);
app.use(express.bodyParser());
app.use(express["static"](__dirname + '/public'));
app.use(express.cookieParser());
app.use(express.session({
secret: "shhhhhhhhhhhhhh!"
}));
app.use(express.methodOverride());
return app.use(app.router);
});
app.configure('development', function() {
return app.use(express.errorHandler({
dumpExceptions: true,
showStack: true
}));
});
app.configure('production', function() {
return app.use(express.errorHandler());
});
require('./routes.js')(app, vimeoConnect, async, db);
app.listen(app.get('port'));
console.log("Express server listening on port " + (app.get('port')));
}).call(this);