{"action":"closed","issue":{"url":"https://api.github.com/repos/nodeschool/discussions/issues/1787","repository_url":"https://api.github.com/repos/nodeschool/discussions","labels_url":"https://api.github.com/repos/nodeschool/discussions/issues/1787/labels{/name}","comments_url":"https://api.github.com/repos/nodeschool/discussions/issues/1787/comments","events_url":"https://api.github.com/repos/nodeschool/discussions/issues/1787/events","html_url":"https://github.com/nodeschool/discussions/issues/1787","id":164408053,"number":1787,"title":"Parse Error - http File Server (exercise 11)","user":{"login":"indusninja","id":466967,"avatar_url":"https://avatars.githubusercontent.com/u/466967?v=3","gravatar_id":"","url":"https://api.github.com/users/indusninja","html_url":"https://github.com/indusninja","followers_url":"https://api.github.com/users/indusninja/followers","following_url":"https://api.github.com/users/indusninja/following{/other_user}","gists_url":"https://api.github.com/users/indusninja/gists{/gist_id}","starred_url":"https://api.github.com/users/indusninja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indusninja/subscriptions","organizations_url":"https://api.github.com/users/indusninja/orgs","repos_url":"https://api.github.com/users/indusninja/repos","events_url":"https://api.github.com/users/indusninja/events{/privacy}","received_events_url":"https://api.github.com/users/indusninja/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodeschool/discussions/labels/learnyounode","name":"learnyounode","color":"F0A028"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-07T21:09:57Z","updated_at":"2016-07-08T08:55:56Z","closed_at":"2016-07-08T08:55:56Z","body":"I have a weird problem. This code runs fine and gives the expected output if I run it through node. But when I try to verify or run through learnyounode, it shows a parse error.\r\n\r\nRunning: node p11b.js 20354 program1.js\r\n\r\nand directing my browser to http://localhost:20354 gives me the output of that file.\r\n\r\n* node version: v4.4.5\r\n* npm version:  2.15.5\r\n### Error output\r\n```\r\nlearnyounode run p11b.js\r\n  ✗  Error connecting to [http://localhost:46624](http://localhost:46624):\r\n  Parse Error\r\n```\r\n\r\n### My Code\r\n```js\r\nvar net = require('net');\r\nvar port = process.argv[2];\r\nvar filename = process.argv[3];\r\n\r\nvar server = net.createServer(function (socket) {\r\n\tvar fs = require('fs');\r\n\tvar readStream = fs.createReadStream(filename);\r\n\treadStream.pipe(socket);\r\n});\r\n\r\nserver.listen(port);\r\n```\r\n"}}
{"actor":{"display_login":"indusninja"}}