분류 전체보기47 str api 에 대하여 (2) strapi에 대하여 간단하게 설명한 글이 가장 많이 찾아 보는 것 같아, 좀 더 자세한 사항에 대하여 설명하는 내용을 작성한다. 만약 이글이 처음 보는 strapi에 대한 것이라면 아래 글을 먼저 읽어 보고 오길 바란다. CMS 기본 str api란? Headless cms CMS(Contents management system)는 개발자뿐 아니라 비개발자들도 한번은 들어봤을 법한 Word Press나 Wix등과 같은 기본적인 Back-end Server, Web-server, Front End 를 직접 코드개발없이 다양한 설정과 템플.. madfishdev.tistory.com strapi 의 모토 위 이미지에서도 볼 수 있는 것과 같이 기본적으로 strapi는 빠르게 API(RestAPIs)를 디자.. 2020. 12. 26. Switch Switch Case문 기본적이니 스위치문과 동일 합니다. 다른 점은 대부분의 다른 언어에서 case문이 5개면 5개중에 맞는 게 어떤 것인지 break가 문을 만나지 않으며 계속 순차적으로 전부 순회하는데 반해, go lang에서는 하나라도 case가 매핑되면, 그대로 switch문을 나가버린다. 보통의 switch문과 다른게 없다. func switchFunc() { fmt.Println("this os is") switch os := runtime.GOOS; os { case "darwin": fmt.Println("OSX") case "linux": fmt.Println("linux") case "windows": fmt.Println("windows") default: fmt.Println(os.. 2020. 12. 23. strapi customizing(2) customizing을 위한 기본적인 내장 함수 설명과, strapi에 의해서 제공되는 기본 APIs 이외 개발자가 생성한 API를 어떻게 추가 하는지 설명 하도록 한다. customizing을 위한 내장 함수 설명 module.exports = { async find(ctx) { let entities; if (ctx.query._q) { entities = await strapi.services['task'].search(ctx.query); } else { entities = await strapi.services['task'].find(ctx.query); } return entities.map(entity => { const item = sanitizeEntity(entity, { model: .. 2020. 12. 18. 조건문 if 조건문 보통 알고 있는 if문의 문법과 거의 동일하다. if 조건 { } 의 형식이다. if else 형식도 기존의 다른 언어 들과 동일하다. 다만 조건문의 Scope는 python과는 다르게 Brace로 구별한다. else if 문도 지원한다. c++, java, javascript라 다른 점은 조건을 쓸때 괄호로 감싸지 않는다. package main import ( "fmt" "math/rand" ) func main() { randNumber := rand.Intn(20) if randNumber > 10 { fmt.Println("this number over 10") } else if randNumber > 5 { fmt.Println("this number over 5") } else { f.. 2020. 12. 18. 이전 1 ··· 3 4 5 6 7 8 9 ··· 12 다음