dogfootman.com

  • 홈
  • 태그
  • 방명록

server 1

[Go] 고랭으로 간단한 HTTP Server 작성 (Writing a simple HTTP Server with Golang)

개요 고랭으로 HTTP 서버 작성 1. Hello World func main() { http.HandleFunc("/", handler) fmt.Println("Start Http Server: http://localhost:8080") err := http.ListenAndServe(":8080", nil) if err != nil { fmt.Println("Error:", err) } } http.DefaultServeMux에 기본적으로 핸들러가 등록 포트를 지정해서 대기 func handler(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "Hello World") } 핸들러 작성 결과 값 확인 2. 임의 로그인 api 작성 func main..

[Go] 2023.07.23
이전
1
다음
더보기
  • View All Categories (13)
    • [Unity] (3)
      • [Unity 2D] (3)
    • [Go] (9)
    • [ETC] (1)

Tag

Camera, Slice, test, pre-request script, Performance, mouse position, deep copy, benchmark, gob, API, Unity 2D, cycle not allowed, Unity, scroll wheel, go, Golang, 고랭, Dependency, struct, Interface,

최근글과 인기글

  • 최근글
  • 인기글

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바