{"id":23629802,"url":"https://github.com/willworks/nodechat","last_synced_at":"2025-08-31T05:32:06.361Z","repository":{"id":80026021,"uuid":"40598571","full_name":"willworks/nodeChat","owner":"willworks","description":"A web application for  Instant messaging and chatting  based on node and websocket ","archived":false,"fork":false,"pushed_at":"2015-09-26T15:38:04.000Z","size":3608,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T13:01:38.999Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://112.74.83.68:8080","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/willworks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-12T12:08:37.000Z","updated_at":"2019-08-18T16:49:43.000Z","dependencies_parsed_at":"2023-03-08T14:45:56.517Z","dependency_job_id":null,"html_url":"https://github.com/willworks/nodeChat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/willworks/nodeChat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willworks%2FnodeChat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willworks%2FnodeChat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willworks%2FnodeChat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willworks%2FnodeChat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willworks","download_url":"https://codeload.github.com/willworks/nodeChat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willworks%2FnodeChat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272940732,"owners_count":25018964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-28T01:18:15.304Z","updated_at":"2025-08-31T05:32:01.333Z","avatar_url":"https://github.com/willworks.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nodeChat  \n\n - A web application for  Instant messaging and chatting  based on node and websocket  \n - 基于node和socket.io的网页版即时聊天程序  \n - 在线地址 : http://112.74.83.68:8080\n\n---\n\n# Install  \n\n - npm install express --save  \n - npm install socket.io --save  \n\n---\n\n# Error  \n\n - 在此解决方案中一次生成一个项目。若要启用并行生成，请添加“/m”开关  \n - MSBUILD : error MSB3428: 未能加载 Visual C++ 组件“VCBuild.exe”  \n - 要解决此问题\u003cbr /\u003e\n\t1) 安装 .NET Fram ework 2.0 SDK  \n\t2) 安装 Microsoft Visual Studio 2005   \n\t3) 如果将该组件安装到了其他位置，请将其位置添加到系统路径中  \n\n---\n\n# Reason    \n\n - my point was that you don't need Visual Studio 2005 -- the message about the .NET Framework 2 SDK is misleading  \n   You just need MSBuild and the C++ compiler, which come along with the Windows SDK I gave you the link to (or by installing a later version of Visual Studio that work on Win8) http://msdn.microsoft.com/en-us/windows/desktop/hh852363.aspx  \n   I'm on Win8 / VS2012 and building native code through npm is not a problem  \n - 我也找了半天，我机器上装的是vs2012，就是转换可能会有问题，从2008到2012更新的强制指定吧，比如用vs2012：npm config set msvs_version 2012 --global  \n - This looks like an issue with building socket.io, specifically the ws package that it depends on, based on the log.However, this is more of a core Node / gyp issue anyhow.. and I think the error message may be a red herring. You should just be able to install the Windows SDK from here and you'll be good to go  \n - 参考github：https://github.com/karma-runner/karma/issues/536  \n - 所以最终可能的问题是socket.io需要重新用node-gyp编译，而node-gyp依赖于python和msvc和msframeworks  \n - 安装node-gyp环境要求 https://github.com/TooTallNate/node-gyp/blob/master/README.md  \n\n---\n\n# Solution  \n\n - 安装node-gyp编译必须的环境python (必须是2.7.X)  \n - Visual Studio (不一定是错误提示里的2005)，并且强制指定：npm config set msvs_version 2012 --global  \n\n---\n\n# Usage  \n\n## client  \n\n\t\tvar socket = io.connect(host,options);\n\t\t\tio.on\n\n\t\t\t当socket与后端成功建立连接后\n\t\t\t-\u003e connect : socket.on('connect',function(){});\n\n\t\t\t当socket正在与服务器建立连接\n\t\t\t-\u003e connecting : socket.on('connecting',function(){});\n\n\t\t\t当与服务器断开连接\n\t\t\t-\u003e disconnect : socket.on('disconnect',function(){});\n\n\t\t\t当与服务器连接失败\n\t\t\t-\u003e connect_failed : socket.on('connect_failed',function(){});\n\n\t\t\t当一个错误发生而且不能被处理\n\t\t\t-\u003e error : socket.on('error',function(){});\n\n\t\t\t通过send方法发送到服务器端，并且被服务器接受并返回到客户端接受后处理的数据\n\t\t\t-\u003e message : socket.on('message',function(message,[callback]){});\n\n\t\t\t可以是任意事件，除了保留的事件之外\n\t\t\t-\u003e anything : socket.on('anything',function(data,[callback]){});\n\n\t\t\tsocket再次连接失败\n\t\t\t-\u003e reconnect_failed : socket.on('reconnect_failed',function(){});\n\n\t\t\t重新连接并且成功\n\t\t\t-\u003e reconnect : socket.on('reconnect',function(){});\n\n\t\t\t重新连接还在连接中..\n\t\t\t-\u003e reconnecting : socket.on('reconnecting',function{});\n\n \n\n## server  \n\n\t\tvar io = require('socket.io');\n\t\t\tio.on\n\n\t\t\t初始化一个socket\n\t\t\t-\u003econnection : io.on('connection',function(socket){});\n\n\t\t\t接受客户端send()方法发送过来服务器的数据\n\t\t\t-\u003emessage : io.on('message',function(message,callback){});\n\n\t\t\t除了库保留的事件外任意自定义事件\n\t\t\t-\u003eanything : io.on('anything',function(data){});\n\n\t\t\t中断socket连接\n\t\t\t-\u003edisconnect : io.on('disconnect',function(){});\n\n---\n\n# Github autoDeployment  \n\nGithub为每个仓库(repository)都可以设置一个或多个自己专属的钩子，且每个钩子都可以设置独立的触发事件(Events)  \n当有push代码的时候，Github会POST一个请求到设置的服务器地址(Payloads URL)  \n服务器通过监测POST，校验参数，就可以执行shell脚本进行git pull更新代码  \n\n具体参考[Github autoDeployment](https://github.com/willworks/autoDeployment)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillworks%2Fnodechat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillworks%2Fnodechat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillworks%2Fnodechat/lists"}