iliakan / iliakan/nodejs-screencast

Не получается запустить чат

Open
#7 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
301
Forks
144
PR merge metrics
No merged PRs in 30d

Description

Здравствуйте Илья!
Прошу вашей помощи. замучился уже и чего я только не попрробовал..
проблема следующая:
при запуске сервера устанавливается соединение - тут вроде наладил его работу с горем пополам.
в логах:

  socket.io:server initializing namespace / +0ms
  socket.io:server creating engine.io instance with opts {"path":"/socket.io"} +2ms
  socket.io:server attaching client serving req handler +3ms
Express server listening on port 80
  socket.io:server incoming connection with id 16t4AWaDr0cnmTPbAAAA +1s
  socket.io:client connecting to namespace / +1ms
  socket.io:namespace adding socket to nsp / +0ms

но вот поле с инпутом на странице не активируется все равно. как я понимаю после установления соединения не срабатывает этот кусочек кода:

.on('connect', function() {
        printStatus("соединение установлено");
        form.on('submit', sendMessage);
        input.prop('disabled', false);
      })

Ошибок никаких при любых действиях не выдает.
Подскажите пожалуйста, в чем может быть проблема? или хотя бы в какую сторону копать..
socket.io установил последнюю версию 1.4.5

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin at the client-side .on('connect') handler shown in the issue, then compare it with the server's Socket.IO connection log and inspect browser console and network output. Confirm whether the client receives the connection event and trace the relevant client/server setup; done when the input is enabled and message submission works without errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
express, javascript, node.js
Domain
backend, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.