Add LAN chat and fast file-transfer web app (Express + WebSocket)#1
Open
Add LAN chat and fast file-transfer web app (Express + WebSocket)#1
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
server.js,基于express提供静态页面与/upload文件上传接口,并用ws广播实时聊天与文件事件。multer将上传文件存储到uploads目录并通过/downloads静态路由提供下载链接。public/index.html、public/app.js和public/styles.css,实现 WebSocket 聊天、拖拽/选择上传、上传状态与传输列表展示的现代化暗色界面。package.json、README.md和.gitignore(忽略node_modules/与uploads/),并在服务器端启动时绑定0.0.0.0:3000以便局域网访问。Testing
npm install用于安装依赖时失败(npm registry 返回403 Forbidden),因此未能完成依赖安装并无法运行npm start进行本地集成测试。Codex Task