diff options
Diffstat (limited to 'plans/dcaegen2-pmmapper/pmmapper/assets/mrserver.js')
-rw-r--r-- | plans/dcaegen2-pmmapper/pmmapper/assets/mrserver.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/plans/dcaegen2-pmmapper/pmmapper/assets/mrserver.js b/plans/dcaegen2-pmmapper/pmmapper/assets/mrserver.js new file mode 100644 index 00000000..a6a61303 --- /dev/null +++ b/plans/dcaegen2-pmmapper/pmmapper/assets/mrserver.js @@ -0,0 +1,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);
\ No newline at end of file |