The following Heroku tutorial Getting started was much more unpleasant than I expected. The fact that I now have probably a configuration problem, and probably it can be solved in less than 10 clicks, but I donโt know what these clicks are, and it makes me get on the wall.
Foreman will not start. I have no experience with Ruby, or Heroku, or Foreman, and practically no experience with web programming, so I donโt know what is going on here. Here is the error message I get running Windows 7 64 bit:
C:\Users\___________\hello_world_basics>foreman start 09:40:17 web.1 | started with pid 2408 09:40:18 web.1 | Listening on 5000 09:40:18 web.1 | 09:40:18 web.1 | Error: write EINVAL 09:40:18 web.1 | at errnoException (net.js:904:11) 09:40:18 web.1 | at Socket._write (net.js:645:26) 09:40:18 web.1 | at doWrite (_stream_writable.js:226:10) 09:40:18 web.1 | at writeOrBuffer (_stream_writable.js:216:5) 09:40:18 web.1 | at Socket.Writable.write (_stream_writable.js:183:11) 09:40:18 web.1 | at Socket.write (net.js:615:40) 09:40:18 web.1 | at Console.log (console.js:53:16) 09:40:18 web.1 | at Server.<anonymous> (C:\Users\___________\hello_world_basics\web.js:14:11) 09:40:18 web.1 | at Server.g (events.js:180:16) 09:40:18 web.1 | exited with code 8 09:40:18 system | sending SIGKILL to all processes 09:40:18 | at Server.EventEmitter.emit (events.js:92:17)
Google is shying away from me. I can not find the answer in any search. I restarted, reinstalled, rewritten, rewritten, re-read, etc., and I cannot find a solution. My code accurately reflects the code on the Getting Started page above, which I will use here for convenience:
PROCFILE:
web: node web.js
web.js
var express = require("express"); var logfmt = require("logfmt"); var app = express(); app.use(logfmt.requestLogger()); app.get('/', function(req, res) { res.send('Hello World!'); }); var port = Number(process.env.PORT || 5000); app.listen(port, function() { console.log("Listening on " + port); });
packge.json
{ "name": "hello_world_basics", "version": "0.0.0", "description": "A simple hello world app.", "main": "web.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", "url": " git@heroku.com :hello_world_basics.git" }, "keywords": [ "twitter", "quality", "bestof" ], "author": "Lincoln Bergeson", "license": "ISC", "dependencies": { "logfmt": "^1.1.2", "express": "^4.4.3" } }
Again, I followed everything on the Getting Started page, but the wizard refuses to start. What's going on here?