aboutsummaryrefslogtreecommitdiffstats
path: root/plans/dcaegen2-pmmapper/pmmapper/assets/mrserver.js
diff options
context:
space:
mode:
authorDaniel Rose <dr695h@att.com>2019-07-31 14:14:09 +0000
committerGerrit Code Review <gerrit@onap.org>2019-07-31 14:14:09 +0000
commit50e113e064e31aed7435ac814e4776b72f842c8f (patch)
treeacca0ec7b209bf852f881095fb9eab6884c12aca /plans/dcaegen2-pmmapper/pmmapper/assets/mrserver.js
parent9a45cee472289cbf0b4c4f45c9154b77d330f65f (diff)
parent117e5988f2ef517d00f16deb93f1b564569572da (diff)
Merge "Update to Setup and Test Case due to dmaap plugin feature in PM Mapper"
Diffstat (limited to 'plans/dcaegen2-pmmapper/pmmapper/assets/mrserver.js')
-rw-r--r--plans/dcaegen2-pmmapper/pmmapper/assets/mrserver.js25
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