aboutsummaryrefslogtreecommitdiffstats
path: root/plans/dcaegen2-pmmapper/pmmapper/assets/mrserver.js
blob: a6a61303a887a64b0dc18861a2be8c7e003aee92 (plain)
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
var httpServer = function() {
var http = require('http'),
url = require('url'),
fs = require('fs'),

start = function(port) {
    var server = http.createServer(function(req, res) {
    processHttpRequest(res);	
    });
    server.listen(port, function() {
    console.log('Listening on ' + port + '...');
    });
},

processHttpRequest = function(res) {
    res.writeHead(200, {'Content-Type': 'text/plain'});
    res.end('Published Successfully.\n');
};

return {
    start: start		
}
}();

httpServer.start(3904);