Created
February 17, 2014 18:16
-
-
Save tarqd/9056038 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* Module dependencies | |
*/ | |
var express = require('express'); | |
var http = require('http'); | |
var path = require('path'); | |
/*! | |
* Application | |
*/ | |
var app = express(); | |
app.set('port', process.env.PORT || 3000); | |
app.use(express.logger('dev')); | |
app.use(express.bodyParser()); | |
// development only | |
if ('development' == app.get('env')) { | |
app.use(express.errorHandler()); | |
} | |
// Handle callbacks | |
app.post('/callback', function (req, res) { | |
var data = req.body; | |
// do something with the e-mail data | |
res.end(); | |
}) | |
// start her up! | |
http.createServer(app).listen(app.get('port'), function(){ | |
console.log('Express server listening on port ' + app.get('port')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment