forked from jamieforrest/github-asana
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.js
More file actions
33 lines (26 loc) · 694 Bytes
/
app.js
File metadata and controls
33 lines (26 loc) · 694 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
/**
* Module dependencies.
*/
var express = require('express')
, github_asana = require('./lib/github-asana')
, bodyParser = require('body-parser');
var app = module.exports = express();
function error(err, req, res, next) {
// log it
console.error(err.stack);
// respond with 500 "Internal Server Error".
res.status(500);
res.send('Internal Server Error');
}
// Configuration
app.use(bodyParser.urlencoded());
app.use(bodyParser.json())
//app.use(express.methodOverride());
//app.use(app.router());
app.use(error);
// Routes
app.post('/', github_asana.index);
var port = process.env.PORT || 3000;
app.listen(port, function() {
console.log("Listening on " + port);
});