본문으로 건너뛰기
TakoAPI
스킬로 돌아가기

ngamux

hadihammurabi 제작

Web & Frontend Development
417clawskills.sh가 보고한 다운로드 수
0조회수
좋아요 0개로그인하면 이 스킬에 좋아요를 누를 수 있습니다
—아직 평가 없음
내 평가

요약

Build and modify web services using ngamux, a simple HTTP router for Go.

설명

이 스킬이 하는 일

ngamux is a lightweight HTTP router for Go that handles route definition, middleware chaining, and request/response processing. It supports path parameters, wildcards, route grouping, and multiple response types including JSON, plain text, and HTML templates.

ngamux provides a fluent request/response API and tree-based route matching without requiring a heavyweight framework, keeping Go web service code concise and idiomatic.

사용 시점

  • Adding authentication middleware to a group of protected API routes
  • Parsing JSON request bodies into Go structs for a REST endpoint
  • Serving file uploads from a multipart form with size limits
  • Organizing versioned API routes under a common /api/v1 prefix
  • Returning HTML template responses for a server-rendered Go web app

예시 워크플로

입력

User asks: create a REST endpoint that accepts a JSON user payload and returns the created user

에이전트
  1. 1

    Define a POST route with mux.Post("/users", createUserHandler)

  2. 2

    In the handler, decode the request body using req.JSON(&user)

  3. 3

    Validate and process the user struct in Go

  4. 4

    Send a 201 Created response with ngamux.Res(rw).Status(http.StatusCreated).JSON(user)

출력

A working POST /users handler that parses JSON input and returns the created user as JSON

설치

clawhub install hadihammurabi/ngamux

CLI 명령을 실행하거나, 프롬프트를 Claude Code, Cursor, Codex 등 사용하는 코딩 에이전트에 붙여넣으세요.

링크