echo
-
Golang - ORM(2) [8]Go 2021. 2. 8. 23:04
2021/02/07 - [Go] - RaspberryPi로 Golang 서버만들기 - ORM(1) [7] RaspberryPi로 Golang 서버만들기 - ORM(1) [7] 백엔드개발을 하다보면 데이터를 객체화해서 DB에 저장하는 일이 많다. 이 과정에서 DB에서 객체로 객체에서 DB로 변환해주는 과정을 거쳐야 된다. 이런 과정을 줄이고 정리하기위해 ORM이란걸 사 yun-seyeong.tistory.com 이전 글에서 보았던 ORM을 이용하면 더 간단히 API를 구성할 수 있다. 2021/01/06 - [Go] - RaspberryPi로 Golang 서버만들기 - 회원관리 하기(1) [6] RaspberryPi로 Golang 서버만들기 - 회원관리 하기(1) [6] 지금까지 세팅한 라즈베리로 회원관리..
-
EC2 - NGINX echo 모듈 빌드하기 [3]AWS 2021. 1. 25. 21:37
1. echo 모듈 다운로드 링크 https://github.com/openresty/echo-nginx-module/tags openresty/echo-nginx-module An Nginx module for bringing the power of "echo", "sleep", "time" and more to Nginx's config file - openresty/echo-nginx-module github.com 2. 원하는 버젼에서 tar.gz다운로드 링크를 복사해 wget으로 받는다. cd /root/workspace wget https://github.com/openresty/echo-nginx-module/archive/v0.62.tar.gz tar -xvf v0.62.tar.gz 3. ..
-
RaspberryPi로 Golang 서버만들기 - 회원관리 하기 (3) [6]Go 2021. 1. 6. 23:21
1. API 연결 //현재 패키지를 설정한다. main은 func main()이 있어야한다. package main //필요한 패키지를 import한다. import ( "fmt" "net/http" _ "github.com/go-sql-driver/mysql" "github.com/labstack/echo/v4" "myserver.com/user" ) func main() { //echo 생성 e := echo.New() // '/'로 GET으로 요청이 왔을때 응답을 설정한다.\ //user생성 API e.PUT("/user", func(c echo.Context) error { u := new(user.User) var err error err = c.Bind(u) fmt.Println(u) if e..
-
RaspberryPi로 Golang 서버만들기 - MariaDB 설치하기 [6]Go 2021. 1. 3. 21:16
1. 라즈베리파이에 아래 명령어로 MySQL을 설치합니다. apt-get update apt-get install mariadb-server 2. mysql 에 접속합니다. mysql -u root -p 초기비밀번호를 설정합니다. 3. localhost에서 접속할때 localhost를 허용해주어야 됩니다. # 마지막의 raspberry는 위에서 설정한 비밀번호이다. grant all privileges on *.* to 'root'@'localhost' identified by 'raspberry'; 4. mysql에 접속이 되면 설치가 완료되었습니다. 5. 데이터베이스 리스트를 확인합니다. show databases; 6. mysql 데이터베이스를 사용하고, 테이블을 확인합니다. use mysql; s..
-
RaspberryPi로 Golang 서버만들기 - OS 설치하기 [1]Go 2021. 1. 2. 23:29
1. 라즈베리파이 - Raspberry Pi 4 Computer Model B 2GB RAM 2. SD 카드 3. C타입 충전기 4. 랜선 5. sd카드 리더기 - sd카드를 부팅디스크로 만들때 필요하다. (SD카드리더기가 있는 노트북이 있는경우 노트북을 이용하면 된다.) 6. micro hdmi 선 - 처음세팅할때 ssh허용을 위해 한번은 무조선 필요하다. (자신의 모니터와 맞는 선을 준비해야된다) RaspberryPi 구매링크: https://coupa.ng/bOPZga SD카드 구매링크: https://coupa.ng/bOQaLB SD카드리더기 구매링크: https://coupa.ng/bOQBId micro hdmi to hdmi선 구매링크 (자신의 모니터와 맞는 선을 준비해야된다): https:/..