{"action":"opened","issue":{"url":"https://api.github.com/repos/nodeschool/discussions/issues/848","labels_url":"https://api.github.com/repos/nodeschool/discussions/issues/848/labels{/name}","comments_url":"https://api.github.com/repos/nodeschool/discussions/issues/848/comments","events_url":"https://api.github.com/repos/nodeschool/discussions/issues/848/events","html_url":"https://github.com/nodeschool/discussions/issues/848","id":54685632,"number":848,"title":"Stuck in learnyounode HTTP UPPERCASER problem","user":{"login":"crapbox","id":10580099,"avatar_url":"https://avatars.githubusercontent.com/u/10580099?v=3","gravatar_id":"","url":"https://api.github.com/users/crapbox","html_url":"https://github.com/crapbox","followers_url":"https://api.github.com/users/crapbox/followers","following_url":"https://api.github.com/users/crapbox/following{/other_user}","gists_url":"https://api.github.com/users/crapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/crapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crapbox/subscriptions","organizations_url":"https://api.github.com/users/crapbox/orgs","repos_url":"https://api.github.com/users/crapbox/repos","events_url":"https://api.github.com/users/crapbox/events{/privacy}","received_events_url":"https://api.github.com/users/crapbox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-18T04:15:56Z","updated_at":"2015-01-18T04:15:56Z","closed_at":null,"body":"Im stuck in the HTTP UPPERCASER problem.\r\n\r\nbelow is my code, and I've googled a lot and other answers seems similar to my code. \r\n\r\nCan't figure out why mine does not work.\r\n\r\nI get \"SyntaxError: Unexpected end of input\"\r\n\r\n\r\nvar http=require('http');\r\nvar map=require('through2-map');\r\n\r\nvar server = http.createServer(function (req,res){\r\n        if (req.method === 'POST'){\r\n                req.pipe(map(function (chunk){\r\n                        console.log(chunk.toString());\r\n                        return chunk.toString().toUpperCase();\r\n                })).pipe(res);\r\n        }\r\n        else{\r\n                console.log(\"not post\");\r\n                res.end();\r\n        }\r\n});\r\nserver.listen(process.argv[2]);\r\n\r\n\r\nAny help is appreciated!\r\n\r\nThanks."}}