[NodeJS] Go와 Nodejs 연결하기
1. Go 서버 설정Go와 Node.js를 연결하려면 여러 방법이 있지만, 일반적으로는 두 언어 간의 통신은 HTTP API를 통해 이루어집니다. 먼저 Go로 간단한 HTTP 서버를 생성합니다.package mainimport ( "encoding/json" "net/http")type Cat struct { Name string `'json:"name"` Age int `json:"age"`}func catsHandler(w http.ResponseWriter, r *http.Request) { if r.Method == http.MethodGet { cats := []Cat{ {Name: "Koras02", Age: 27}, {Name: "PiPi", Age: 22}, } w.Header()...