Node.js + forever module 로 백엔드 서버를 구축하여 돌리던 중, Forever log 에 아래와 같은 메세지가 떳다. Error: Connection lost: The server closed the connection. at Protocol.end (/home/ywlee/LifeCleanAPI/node_modules/mysql/lib/protocol/Protocol.js:112:13) at Socket. (/home/ywlee/LifeCleanAPI/node_modules/mysql/lib/Connection.js:97:28) at Socket. (/home/ywlee/LifeCleanAPI/node_modules/mysql/lib/Connection.js:525:10) at emi..
Nodejs의 socket을 이용하여 채팅구현 socket의 양방향 통신을 이용하여 채팅을 구현한다. 사전 조건 서버 환경 : CentOS, NodeJS(express+socket.io) 구성하기 먼저, 서버에는 nodejs가 설치되어있어야 한다.작업할 폴더를 생성한 후, 아래와 같이 package.json 파일을 생성해보자 /package.json { "name": "marlboroyw-chat", "version": "1.0.0", "description": "Chat P with nodejs+socket.io", "dependencies": { }} express 설치 아래와 같이 타이핑하여 node.js framework express 를 설치하자 [root@localhost node_chat]#..
extraneous ? 사전적인 정의로 '관계 없는' 이라는 뜻의 영어 단어이다. npm install -> npm list npm install 로 websocket module 인 'ws'를 설치했다.npm list 를 타이핑 했더니 아래와 같은 결과가 노출되며, websocket이 동작되지 않았다. [root@localhost gchat]# npm listnpm WARN npm npm does not support Node.js v0.10.46npm WARN npm You should probably upgrade to a newer version of node as wenpm WARN npm can't make any promises that npm will work with this versio..
2017/01/10 - [Computer/node.js] - node.js ) 8일차 - DB 이용해보기 - SELECT (MySQL)2017/01/09 - [Computer/node.js] - node.js ) 7일차 - Express Framework ' Hello World '2016/12/21 - [Computer/node.js] - node.js ) 6일차 - 의존성2016/12/17 - [Computer/node.js] - node.js ) 5일차 - 모듈화2016/12/17 - [Computer/node.js] - node.js ) 4일차 - 이벤트형 처리2016/12/16 - [Computer/node.js] - node.js ) 3일차 - 함수 작성2016/12/16 - [Computer..
2017/01/09 - [컴퓨터/node.js] - node.js ) 7일차 - Express Framework ' Hello World '2017/01/05 - [컴퓨터/node.js] - node.js ) 번외 - Express Framework 및 jade2016/12/21 - [컴퓨터/node.js] - node.js ) 6일차 - 의존성2016/12/17 - [컴퓨터/node.js] - node.js ) 5일차 - 모듈화2016/12/17 - [컴퓨터/node.js] - node.js ) 4일차 - 이벤트형 처리2016/12/16 - [컴퓨터/node.js] - node.js ) 3일차 - 함수 작성2016/12/16 - [컴퓨터/node.js] - node.js ) 2일차 - 웹서버 구동201..
2017/01/05 - [컴퓨터/node.js] - node.js ) 번외 - Express Framework 및 jade2016/12/21 - [컴퓨터/node.js] - node.js ) 6일차 - 의존성2016/12/17 - [컴퓨터/node.js] - node.js ) 5일차 - 모듈화2016/12/17 - [컴퓨터/node.js] - node.js ) 4일차 - 이벤트형 처리2016/12/16 - [컴퓨터/node.js] - node.js ) 3일차 - 함수 작성2016/12/16 - [컴퓨터/node.js] - node.js ) 2일차 - 웹서버 구동2016/12/16 - [컴퓨터/node.js] - node.js ) 1일차 - Hello World ! 오늘은 Node.js Express Fr..
노드JS 에러 중 노드 웹서버를 실행 후 아래와 같은 메세지를 보는 경우가 있다. [root@localhost node_7]# node server.js events.js:72 throw er; // Unhandled 'error' event ^ Error: listen EADDRINUSE at errnoException (net.js:905:11) at Server._listen2 (net.js:1043:14) at listen (net.js:1065:10) at Server.listen (net.js:1139:5) at EventEmitter.listen (/home/yw/node_test/node_7/node_modules/express/lib/application.js:617:24) at Obje..
2016/12/21 - [컴퓨터/node.js] - node.js ) 6일차 - 의존성2016/12/17 - [컴퓨터/node.js] - node.js ) 5일차 - 모듈화2016/12/17 - [컴퓨터/node.js] - node.js ) 4일차 - 이벤트형 처리2016/12/16 - [컴퓨터/node.js] - node.js ) 3일차 - 함수 작성2016/12/16 - [컴퓨터/node.js] - node.js ) 2일차 - 웹서버 구동2016/12/16 - [컴퓨터/node.js] - node.js ) 1일차 - Hello World ! 여기까지 했으면 이제 노드 시작이라고 보면 되겠다Node.js 웹서버를 자체로 구축해도 되지만..우리는 굳이 좋은 프레임워크들을 두고 일일히 손으로 하나씩 한땀한..
2016/12/16 - [컴퓨터/node.js] - node.js ) 1일차 - Hello World !2016/12/16 - [컴퓨터/node.js] - node.js ) 2일차 - 웹서버 구동2016/12/16 - [컴퓨터/node.js] - node.js ) 3일차 - 함수 작성2016/12/17 - [컴퓨터/node.js] - node.js ) 4일차 - 이벤트형 처리2016/12/17 - [컴퓨터/node.js] - node.js ) 5일차 - 모듈화 5일차의 모듈화는 오늘의 의존성 주입을 위한 것임 모든 웹서버 코드를 server.js 에 넣을수도 있지만.. server.js 의 덩치가 커질수록 우리는 점점 더 유지보수에 어려움을 겪게 될 것이다. 따라서 모든 프로그래밍이 그러하듯 노드도 잘게..
1. Hello World !node.js ) 1일차 - Hello World ! 2. 웹서버 구동node.js ) 2일차 - 웹서버 구동 3. 함수 작성node.js ) 3일차 - 함수 작성 4. 이벤트형 처리node.js ) 4일차 - 이벤트형 처리 - 지금까지는 웹 서버를 server.js 라는 파일 하나로만 만들어 보았다.하지만, 점점 server.js 에 추가할 코드들이 많아질 것이고, 점ㅁ점 더 읽기 어려워지며, 찾기 어려워 질 것이다.node.js 는 웹서버 작성을 굳이 한파일에 몰아 쓸 필요가 없다. 웹서버 js 파일의 모듈화를 진행해보자. 1. 5 일차 노드 폴더 작성 [root@localhost node_test]# mkdir node_5[root@localhost node_test]#..
- Total
- Today
- Yesterday
- C
- node.js
- Swift
- Phaser
- 배열
- CentOS
- Kotlin
- mysql
- 깃헙
- php
- git hub
- 손석희
- 스위프트
- Asterisk
- 점유율
- 서버
- C언어
- 리눅스
- IOS
- 뉴스룸
- 노드
- BBC 가쉽
- linux
- 안드로이드
- GIT
- Node
- xcode
- 앵커브리핑
- nodejs
- Android
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |