본문 바로가기 메뉴 바로가기

Data Makes Our Future

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

Data Makes Our Future

검색하기 폼
  • 분류 전체보기 (740)
    • Data (18)
      • Statistics (10)
      • Analysis (8)
    • SQL (24)
      • Organize (3)
      • Install (2)
    • R (58)
      • Collection (4)
      • Process (33)
      • Analysis (11)
      • Visualize (4)
      • Install (3)
    • Python (56)
      • Collection (10)
      • Process (27)
      • Visualize (2)
      • Install (3)
    • Web (164)
      • API (16)
      • Spring (58)
      • JAVA (49)
      • Infra (11)
    • PS (366)
      • Algorithm (45)
      • Problem_Solving (311)
      • PS_Note (7)
    • Books (35)
    • ADsP (4)
    • eTc (15)
  • 방명록

require (1)
[Node.js] http 클래스를 활용한 기본 서버 구성

.Node.js http 클래스를 활용한 기본 서버 구성 123456789var http = require("http"); http.createServer(function (req, res) { var body = "hello Server"; res.setHeader('Content-Type', 'text/html; charset=utf-8'); res.end("This is My Server~~~!"+body+"")}).listen(3000); console.log('server is Started'); cs line 1) http 모듈을 require()로 불러온다.line 4) body에 넣을 textline 5) response의 Header를 설정line 7) 3000번 port로 서버 대기

Web 2020. 6. 22. 11:31
이전 1 다음
이전 다음
최근에 올라온 글
최근에 달린 댓글
링크
  • Gitbook
  • resume
Total
Today
Yesterday
TAG
  • java
  • C
  • 시뮬레이션
  • R
  • DFS
  • dp
  • DATA
  • spring
  • BFS
  • c++
  • PYTHON
  • 백준
  • Algorithm
  • coding
  • BOJ
more

Blog is powered by Tistory / Designed by Tistory

티스토리툴바