2015-07-07 23:19:44 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var http = require('http');
|
|
|
|
var server = http.createServer();
|
|
|
|
var port = process.argv[2] || 8080;
|
|
|
|
|
|
|
|
server.on('request', require('./')({
|
|
|
|
port: 8443
|
2015-07-07 23:30:56 +00:00
|
|
|
, body: 'Redirecting to <a href="{{URL}}">{{HTML_URL}}</a>'
|
2015-07-07 23:19:44 +00:00
|
|
|
, trustProxy: true // default is false
|
|
|
|
}));
|
|
|
|
|
|
|
|
server.listen(port, function () {
|
|
|
|
console.log('Listening on http://localhost.daplie.com:' + server.address().port);
|
|
|
|
});
|