blob: a6a61303a887a64b0dc18861a2be8c7e003aee92 [file] [log] [blame]
rajendrajaiswal117e5982019-07-30 09:54:29 +00001var httpServer = function() {
2var http = require('http'),
3url = require('url'),
4fs = require('fs'),
5
6start = function(port) {
7 var server = http.createServer(function(req, res) {
8 processHttpRequest(res);
9 });
10 server.listen(port, function() {
11 console.log('Listening on ' + port + '...');
12 });
13},
14
15processHttpRequest = function(res) {
16 res.writeHead(200, {'Content-Type': 'text/plain'});
17 res.end('Published Successfully.\n');
18};
19
20return {
21 start: start
22}
23}();
24
25httpServer.start(3904);