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

관광이 블로그

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

관광이 블로그

검색하기 폼
  • 감자 카테고리 (258)
    • Computer Science (2)
    • CodingInterview (2)
    • InfraStructure (2)
    • AI (24)
    • Android (37)
    • Node.js (32)
    • Network (1)
    • Spring (14)
    • Database (5)
    • Algorithm (50)
    • Github (6)
    • Security (26)
    • React (7)
    • Assembly Language (8)
    • C Language (31)
    • Python (1)
    • OS (2)
    • 환경설정 (5)
    • 기타 (0)
      • 영어 (0)
      • 프로젝트 (0)
  • 방명록

서버 열기 (1)
[node.js]생활코딩 정리 3 - 웹 서버 만들기

웹 서버 코드 // const 는 상수 이며, 값이 한번 할당되면 바꿀수 없다.const http = require('http');const hostname = '127.0.0.1';const port = 1337;const server = http.createServer((req, res) => { res.setHeader('Content-Type', 'text/plain'); res.end('Hello World\n');}); // 서버 생성 코드 // 서버 대기 상태(서버 열기) 만드는 코드server.listen(port, hostname, () => { console.log(`Server running at http://${hostname}:${port}/`);});

Node.js 2017. 9. 17. 00:08
이전 1 다음
이전 다음
공지사항
  • Potato Coding IT Blog
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • BFS
  • 알고리즘
  • 리버싱
  • 감자코딩
  • 머신러닝
  • 감자개발자
  • db
  • 학교
  • 백준
  • C langauge
  • 복습
  • programming
  • 텐서플로우
  • node.js
  • TensorFlow
  • 백준알고리즘
  • MVC
  • node
  • Spring
  • 스프링
  • 프로그래밍
  • 개발하는 관광이
  • 안드로이드
  • Controller
  • C언어
  • 초보자를 위한 C언어 300제
  • Android
  • Algorigm
  • 코드엔진
  • 노드
more
«   2025/05   »
일 월 화 수 목 금 토
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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바