API (3) 썸네일형 리스트형 Go gin middleware 적용하기 middleware(미들웨어) ?? client server 통신에서, 중복되는 일(인증, 로깅, ...)을 효과적으로 처리하기 위해 middleware를 활용합니다. cleint middleware server middleware(미들웨어)를 golang의 API Server 에서 적용시키는 예제를 확인합니다. 예제 지난 포스트 에서 gin 패키지를 이용한 API 를 만들었었는데 비슷하게 활용할 예정이다. main.go package main import "github.com/gin-gonic/gin" // middleware 구현 func DummyMiddleware() gin.HandlerFunc { // Do some initialization logic here return func(c *gin.. API server를 위한 go Gin 설치하고 사용하기 (예제) GIN? Gin is a web framework written in Go (Golang). It features a martini-like API with performance that is up to 40 times faster thanks to httprouter. If you need performance and good productivity, you will love Gin. (GIN git)[https://github.com/gin-gonic/gin] 위 내용대로 _Gin은 Go로 작성된 웹 프레임웍_이다. httprouter 덕분에 40배나 빠른 퍼포먼스를 자랑한다고 한다.. (무슨말인지 ?) 이정도로만 알고 넘어가자.. Gin 설치 간단한 시험을 위해 우선 프로젝트 디렉토리를 하나 만들고.. [react] git API를 이용해보기(1) (yarn, react-route, axios) react를 이용해 개인 git 프로필을 불러오고 관련하여 몇가지 기능을 수행하는 페이지를 만들어 보려한다. npx create-react-app 으로 최초 프로젝트는 준비되어 있는 상태를 가정한다. 우선 관련 기능을 구현하기 위한 라이브러리를 불러온다 $ npm install axios react-route antd $ yarn add axios react-route antd 각 library에 대한 설명은 너무 잘 설명된 페이지가 많기 때문에 생략한다. 이후 API를 이용한 호출기능을 먼저 확인하기 위해 app.js 파일을 아래와 같이 수정한다. import './App.css'; import 'antd/dist/antd.css'; import './index.css'; import { Button .. 이전 1 다음