{"id":19349215,"url":"https://github.com/son-b/node.js-chat-file","last_synced_at":"2025-02-24T10:19:08.747Z","repository":{"id":110267385,"uuid":"548990831","full_name":"SoN-B/Node.JS-Chat-File","owner":"SoN-B","description":"주하히님 블로그 참고하며 실시간 채팅 \u0026 파일전송 스터디","archived":false,"fork":false,"pushed_at":"2022-10-11T15:31:06.000Z","size":393,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-06T15:18:40.046Z","etag":null,"topics":["aws-sdk","multer","multer-s3","socket-io"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SoN-B.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-10T13:59:19.000Z","updated_at":"2023-01-09T16:13:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"59cd7e86-19a1-471f-b492-7a2b7353e0af","html_url":"https://github.com/SoN-B/Node.JS-Chat-File","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoN-B%2FNode.JS-Chat-File","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoN-B%2FNode.JS-Chat-File/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoN-B%2FNode.JS-Chat-File/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoN-B%2FNode.JS-Chat-File/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SoN-B","download_url":"https://codeload.github.com/SoN-B/Node.JS-Chat-File/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240457988,"owners_count":19804489,"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","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":["aws-sdk","multer","multer-s3","socket-io"],"created_at":"2024-11-10T04:25:20.764Z","updated_at":"2025-02-24T10:19:08.724Z","avatar_url":"https://github.com/SoN-B.png","language":"HTML","readme":"# nodejs-chatting\n\n[출처 - 설명 포스팅1 ](https://juhi.tistory.com/8)\n\n[출처 - 설명 포스팅2 ](https://juhi.tistory.com/9)\n\n---\n\n## Project Introduce\n\nNode.js의 socket.io모듈을 이용하여 채팅 기능을 구현함\n\n-   채팅방 생성\n-   그룹, 일대일 채팅 기능\n-   사진 전송\n\n![p1](./readme/p1.PNG)\n![p2](./readme/p2.PNG)\n![p3](./readme/p3.PNG)\n\n## Code Description\n\n[기본]\n\n1. 클라이언트 : join에 방이름과 함께 socket.emit()\n2. 서버 : io.sockets.on연결 \u0026 클라이언트 해당 방에 socket.on(join, ) \u0026 socket.join(방이름)\n3. 클라이언트 : #name.val()에 닉네임 작성후 /#chatpage로 넘어감 (그값은 계속 저장돼 있음)\n\n[메세지 전송]\n\n1. 클라이언트 : #button.click()시 name, message, date값 서버로 socket.emit(message)\n2. 서버 : socket.on(message)로 받고, 해당 방이름에(roomName)에 재전달\n3. 클라이언트 : socket.on(message)로 받고, 해당 값들 html에 재구성(추가)\n\n[사진 전송]\n\n1. 클라이언트 : #uploadbtn.on('click', ~)시 uploadFile()함수(해당API로 POST요청) 실행\n2. 서버 : image받고 s3에 업로드 및 해당 객체주소 클라이언트에 리턴\n3. 클라이언트 : 성공했을때, name, message(s3 객체 주소), date 뿌려줌\n\n## Dependency Module\n\n```\n\"dependencies\": {\n    \"aws-sdk\": \"^2.1230.0\",\n    \"express\": \"^4.18.1\",\n    \"multer\": \"^1.4.5-lts.1\",\n    \"multer-s3\": \"^2.10.0\",\n    \"mysql2\": \"^2.3.3\",\n    \"sequelize\": \"^6.24.0\",\n    \"socket.io\": \"^4.5.2\"\n},\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fson-b%2Fnode.js-chat-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fson-b%2Fnode.js-chat-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fson-b%2Fnode.js-chat-file/lists"}