Closed ds7-ds closed 4 years ago
Tried removing the port and this error popped up:
Confused why the port option didn't work. Reading docs plus examples and trying the server option.
The server option required an instance of express, so I transferred the code to the main app to see if the error would be resolved. The server code works now, but the webpage cannot seem to connect.
After reading the Heroku docs on WebSockets. No port or http server instance was created yet the app is listening on some port! The code for that was somewhere inside the bin folder. Transferred the code there under the instance and code finally works. IntelliJ automated NodeJS Express project and so I didn't realize no HTTP server was ever made in app.js.
When trying to instantiate a WebSocket server, I get a message saying that the port is already in use. Before, I used port 8080 as it was shown in the example and it worked in local but not in production.