채팅
-
[NodeJs] 채팅 서버 만들어서 실행하기프레임워크/NodeJs 2022. 5. 29. 00:56
채팅 서버를 간단하게 오픈할 수 있도록 만들어보겠습니다. Socket.io를 사용하였고, 공식 홈페이지에 나와있는 대로 구현해보려고 합니다. https://socket.io/get-started/chat NodeJS 설치 후 npm 프로젝트 생성을 합니다 $ npm init 맨 처음 npm init 명령어를 실행하면 package.json 파일이 생성됩니다 { "name": "chat-socket", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC" } ES6 문법을 사용..