О, спасибо за подсказки.
Это видимо ТОП подводных камней, с которыми сталкиваются новички. Сразу по ходовой: socket.io — еще не ставил. express — не поставился. Лог установки:
npm install express npm http GET https://registry.npmjs.org/express npm http 304 https://registry.npmjs.org/express npm http GET https://registry.npmjs.org/connect/2.8.5 npm http GET https://registry.npmjs.org/commander/1.2.0 npm http GET https://registry.npmjs.org/mkdirp/0.3.5 npm http GET https://registry.npmjs.org/cookie/0.1.0 npm http GET https://registry.npmjs.org/fresh/0.2.0 npm http GET https://registry.npmjs.org/buffer-crc32/0.2.1 npm http GET https://registry.npmjs.org/methods/0.0.1 npm http GET https://registry.npmjs.org/send/0.1.4 npm http GET https://registry.npmjs.org/cookie-signature/1.0.1 npm http GET https://registry.npmjs.org/debug npm http GET https://registry.npmjs.org/range-parser/0.0.4 npm http 304 https://registry.npmjs.org/commander/1.2.0 npm http 304 https://registry.npmjs.org/buffer-crc32/0.2.1 npm http 304 https://registry.npmjs.org/connect/2.8.5 npm http 304 https://registry.npmjs.org/cookie/0.1.0 npm http 304 https://registry.npmjs.org/fresh/0.2.0 npm http 304 https://registry.npmjs.org/methods/0.0.1 npm http 304 https://registry.npmjs.org/send/0.1.4 npm http 304 https://registry.npmjs.org/cookie-signature/1.0.1 npm http 304 https://registry.npmjs.org/debug npm http 304 https://registry.npmjs.org/range-parser/0.0.4 npm http 304 https://registry.npmjs.org/mkdirp/0.3.5 npm ERR! error installing express@3.3.5 npm ERR! error rolling back express@3.3.5 Error: ENOTEMPTY, rmdir '/var/www/node/public_html/node_modules/express' npm ERR! Unsupported npm ERR! Not compatible with your version of node/npm: connect@2.8.5 npm ERR! Required: {"node":">= 0.8.0"} npm ERR! Actual: {"npm":"1.1.4","node":"0.6.19"} npm ERR! npm ERR! System Linux 3.8.0-19-generic npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "express" npm ERR! cwd /var/www/node/public_html npm ERR! node -v v0.6.19 npm ERR! npm -v 1.1.4 npm ERR! code ENOTSUP npm ERR! message Unsupported npm ERR! errno {} npm http GET https://registry.npmjs.org/mime npm http GET https://registry.npmjs.org/keypress npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /var/www/node/public_html/npm-debug.log npm not ok
Я так понял, что он ругается на старую версию ноды. Возможно. Я устанавливал через apt-get install node. Потом я ее удалял и скачивал просто бинарники с официального сайта (которые не устанавливаются, а просто в /usr/sbin/bin/ закидывал). Могу конечно ошибиться с пониманием ошибки.
Mysql Это устанавливал, коннект с базой данных есть, запросы выполняются. А вот PDO не нашел (если подозрение, что его нет, хотя упоминания об ORM в сети вроде как есть).
Сразу делай условие типа if (data.exit = 1) process.exit(code=0); дабы убивать работу процесса чтоб не висел
За эту подсказку отдельное спасибо, так как процесс действительно подвисал, и приходилось убивать через kill.