[{"data":1,"prerenderedAt":474},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fmain\u002Fquick-start":3},{"id":4,"title":5,"body":6,"description":461,"extension":462,"group":463,"meta":464,"navigation":465,"order":466,"path":467,"section":468,"seo":469,"source":470,"stem":471,"version":472,"__hash__":473},"docs\u002Fdocs\u002Fmain\u002Fquick-start.md","Your first API project",{"type":7,"value":8,"toc":451},"minimark",[9,14,40,50,54,97,100,104,128,135,139,166,174,177,204,207,233,240,244,247,273,276,299,320,324,404,411,415,423,435,439,447],[10,11,13],"h2",{"id":12},"install-the-cli","Install the CLI",[15,16,21],"pre",{"className":17,"code":18,"language":19,"meta":20,"style":20},"language-sh shiki shiki-themes light-plus light-plus dark-plus","go install github.com\u002Famkargar\u002Fgonex\u002Fcmd\u002Fgonex@3ca54b46cb42\n","sh","",[22,23,24],"code",{"__ignoreMap":20},[25,26,29,33,37],"span",{"class":27,"line":28},"line",1,[25,30,32],{"class":31},"swoLU","go",[25,34,36],{"class":35},"sFD8J"," install",[25,38,39],{"class":35}," github.com\u002Famkargar\u002Fgonex\u002Fcmd\u002Fgonex@3ca54b46cb42\n",[41,42,43,44,49],"p",{},"Use Go 1.27.2 and put Go's binary directory on PATH. See ",[45,46,48],"a",{"href":47},"\u002Fdocs\u002Fmain\u002Finstallation\u002F","installation"," for details. This is a pinned development snapshot, not a stable release.",[10,51,53],{"id":52},"create-your-application","Create your application",[15,55,57],{"className":17,"code":56,"language":19,"meta":20,"style":20},"gonex new shop --module example.com\u002Facme\u002Fshop\ncd shop\ngo mod tidy\n",[22,58,59,77,86],{"__ignoreMap":20},[25,60,61,64,67,70,74],{"class":27,"line":28},[25,62,63],{"class":31},"gonex",[25,65,66],{"class":35}," new",[25,68,69],{"class":35}," shop",[25,71,73],{"class":72},"stxUP"," --module",[25,75,76],{"class":35}," example.com\u002Facme\u002Fshop\n",[25,78,80,83],{"class":27,"line":79},2,[25,81,82],{"class":31},"cd",[25,84,85],{"class":35}," shop\n",[25,87,89,91,94],{"class":27,"line":88},3,[25,90,32],{"class":31},[25,92,93],{"class":35}," mod",[25,95,96],{"class":35}," tidy\n",[41,98,99],{},"You now have your own Go application: main.go, config\u002F, modules\u002F, a pinned framework dependency and a project-local CLI tool. No framework clone or Git commands are part of this setup.",[10,101,103],{"id":102},"add-an-http-module","Add an HTTP module",[15,105,107],{"className":17,"code":106,"language":19,"meta":20,"style":20},"go tool gonex create module users\n",[22,108,109],{"__ignoreMap":20},[25,110,111,113,116,119,122,125],{"class":27,"line":28},[25,112,32],{"class":31},[25,114,115],{"class":35}," tool",[25,117,118],{"class":35}," gonex",[25,120,121],{"class":35}," create",[25,123,124],{"class":35}," module",[25,126,127],{"class":35}," users\n",[41,129,130,131,134],{},"HTTP is the default transport. This creates a small editable JSON endpoint at ",[22,132,133],{},"\u002Fusers"," plus service, handler, schemas and route files. There is no database, gRPC or HTTP API version requirement.",[10,136,138],{"id":137},"run-and-inspect-the-server","Run and inspect the server",[15,140,142],{"className":17,"code":141,"language":19,"meta":20,"style":20},"go tool gonex check\ngo tool gonex run\n",[22,143,144,155],{"__ignoreMap":20},[25,145,146,148,150,152],{"class":27,"line":28},[25,147,32],{"class":31},[25,149,115],{"class":35},[25,151,118],{"class":35},[25,153,154],{"class":35}," check\n",[25,156,157,159,161,163],{"class":27,"line":79},[25,158,32],{"class":31},[25,160,115],{"class":35},[25,162,118],{"class":35},[25,164,165],{"class":35}," run\n",[41,167,168,169,173],{},"The terminal displays the actual bound server URL, environment, Gonex version, OpenAPI URL and Ctrl+C instructions after a successful start. Each request emits a completion log with request ID, route, status and elapsed milliseconds. ",[45,170,172],{"href":171},"\u002Fdocs\u002Fmain\u002Flogging\u002F","Configure logs"," for readable development output or production JSON.",[41,175,176],{},"From another terminal:",[15,178,180],{"className":17,"code":179,"language":19,"meta":20,"style":20},"curl http:\u002F\u002F127.0.0.1:8080\u002Fusers\ncurl http:\u002F\u002F127.0.0.1:8080\u002Fhealthz\ncurl http:\u002F\u002F127.0.0.1:8080\u002Fopenapi.json\n",[22,181,182,190,197],{"__ignoreMap":20},[25,183,184,187],{"class":27,"line":28},[25,185,186],{"class":31},"curl",[25,188,189],{"class":35}," http:\u002F\u002F127.0.0.1:8080\u002Fusers\n",[25,191,192,194],{"class":27,"line":79},[25,193,186],{"class":31},[25,195,196],{"class":35}," http:\u002F\u002F127.0.0.1:8080\u002Fhealthz\n",[25,198,199,201],{"class":27,"line":88},[25,200,186],{"class":31},[25,202,203],{"class":35}," http:\u002F\u002F127.0.0.1:8080\u002Fopenapi.json\n",[41,205,206],{},"The module returns:",[15,208,212],{"className":209,"code":210,"language":211,"meta":20,"style":20},"language-json shiki shiki-themes light-plus light-plus dark-plus","{\"message\":\"users\"}\n","json",[22,213,214],{"__ignoreMap":20},[25,215,216,220,224,227,230],{"class":27,"line":28},[25,217,219],{"class":218},"s_Yst","{",[25,221,223],{"class":222},"s9Kr7","\"message\"",[25,225,226],{"class":218},":",[25,228,229],{"class":35},"\"users\"",[25,231,232],{"class":218},"}\n",[41,234,235,236,239],{},"The response header ",[22,237,238],{},"X-Request-ID"," matches the request's log correlation ID. Stop with Ctrl+C to drain requests and close resources.",[10,241,243],{"id":242},"see-the-development-welcome-page","See the development welcome page",[41,245,246],{},"Enable debug mode in the process running your application:",[15,248,250],{"className":17,"code":249,"language":19,"meta":20,"style":20},"DEBUG=true go tool gonex run\n",[22,251,252],{"__ignoreMap":20},[25,253,254,258,261,264,267,269,271],{"class":27,"line":28},[25,255,257],{"class":256},"sswaR","DEBUG",[25,259,260],{"class":218},"=",[25,262,263],{"class":35},"true",[25,265,266],{"class":31}," go",[25,268,115],{"class":35},[25,270,118],{"class":35},[25,272,165],{"class":35},[41,274,275],{},"On PowerShell:",[15,277,281],{"className":278,"code":279,"language":280,"meta":20,"style":20},"language-powershell shiki shiki-themes light-plus light-plus dark-plus","$env:DEBUG = \"true\"\ngo tool gonex run\n","powershell",[22,282,283,294],{"__ignoreMap":20},[25,284,285,288,291],{"class":27,"line":28},[25,286,287],{"class":256},"$env:DEBUG",[25,289,290],{"class":218}," = ",[25,292,293],{"class":35},"\"true\"\n",[25,295,296],{"class":27,"line":79},[25,297,298],{"class":218},"go tool gonex run\n",[41,300,301,302,305,306,310,311,314,315,319],{},"Visit ",[22,303,304],{},"http:\u002F\u002F127.0.0.1:8080\u002F"," for ",[307,308,309],"strong",{},"Welcome to Gonex",", the duck mascot, website\nand documentation links. A matching application root route takes priority.\nBrowser errors show diagnostics; JSON clients keep their API response format.\nUse ",[22,312,313],{},"DEBUG=false"," for public deployments. ",[45,316,318],{"href":317},"\u002Fdocs\u002Fmain\u002Fdebug\u002F","Debug mode details",".",[10,321,323],{"id":322},"know-where-to-write-code","Know where to write code",[325,326,327,340],"table",{},[328,329,330],"thead",{},[331,332,333,337],"tr",{},[334,335,336],"th",{},"File",[334,338,339],{},"Your responsibility",[341,342,343,354,364,374,384,394],"tbody",{},[331,344,345,351],{},[346,347,348],"td",{},[22,349,350],{},"modules\u002Fusers\u002Fservice.go",[346,352,353],{},"Business behavior, plain Go inputs and results",[331,355,356,361],{},[346,357,358],{},[22,359,360],{},"modules\u002Fusers\u002Fhttp\u002Fschemas.go",[346,362,363],{},"Request\u002Fresponse DTOs and validation",[331,365,366,371],{},[346,367,368],{},[22,369,370],{},"modules\u002Fusers\u002Fhttp\u002Fhandlers.go",[346,372,373],{},"Request-to-service mapping",[331,375,376,381],{},[346,377,378],{},[22,379,380],{},"modules\u002Fusers\u002Fhttp\u002Froutes.go",[346,382,383],{},"Endpoint methods, paths and statuses",[331,385,386,391],{},[346,387,388],{},[22,389,390],{},"modules\u002Fusers\u002Fhttp\u002Fopenapi.go",[346,392,393],{},"API descriptions",[331,395,396,401],{},[346,397,398],{},[22,399,400],{},"modules\u002Fusers\u002Fmodule.go",[346,402,403],{},"Service construction and adapter wiring",[41,405,406,407,410],{},"Edit these handwritten files inside your app. Keep ",[22,408,409],{},".gonex.json"," and generated registries tool-owned. Generators refuse to overwrite existing module code.",[10,412,414],{"id":413},"continue-with-a-real-resource-api","Continue with a real resource API",[41,416,417,418,422],{},"The starter response demonstrates the structure; it is not generated CRUD. Continue with ",[45,419,421],{"href":420},"\u002Fdocs\u002Fmain\u002Fbuilding-api\u002F","Build a REST API"," for create\u002Flist\u002Fget users, JSON validation, conflict\u002Fnot-found errors and OpenAPI. That guide starts from a separate generated project so its custom users module does not conflict with this starter.",[41,424,425,429,430,434],{},[45,426,428],{"href":427},"\u002Fdocs\u002Fmain\u002Fproject-structure\u002F","Project structure"," explains ownership; ",[45,431,433],{"href":432},"\u002Fdocs\u002Fmain\u002Fcli\u002F","CLI reference"," covers optional database, versioned HTTP and gRPC commands.",[10,436,438],{"id":437},"need-independent-services","Need independent services?",[41,440,441,442,446],{},"The monolith remains the simplest default. Follow ",[45,443,445],{"href":444},"\u002Fdocs\u002Fmain\u002Fmicroservices-quickstart\u002F","First microservice call"," when you need independent services; no framework clone is required.",[448,449,450],"style",{},"html pre.shiki code .swoLU, html code.shiki .swoLU{--shiki-light:#795E26;--shiki-default:#795E26;--shiki-dark:#DCDCAA}html pre.shiki code .sFD8J, html code.shiki .sFD8J{--shiki-light:#A31515;--shiki-default:#A31515;--shiki-dark:#CE9178}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .stxUP, html code.shiki .stxUP{--shiki-light:#0000FF;--shiki-default:#0000FF;--shiki-dark:#569CD6}html pre.shiki code .s_Yst, html code.shiki .s_Yst{--shiki-light:#000000;--shiki-default:#000000;--shiki-dark:#D4D4D4}html pre.shiki code .s9Kr7, html code.shiki .s9Kr7{--shiki-light:#0451A5;--shiki-default:#0451A5;--shiki-dark:#9CDCFE}html pre.shiki code .sswaR, html code.shiki .sswaR{--shiki-light:#001080;--shiki-default:#001080;--shiki-dark:#9CDCFE}",{"title":20,"searchDepth":79,"depth":79,"links":452},[453,454,455,456,457,458,459,460],{"id":12,"depth":79,"text":13},{"id":52,"depth":79,"text":53},{"id":102,"depth":79,"text":103},{"id":137,"depth":79,"text":138},{"id":242,"depth":79,"text":243},{"id":322,"depth":79,"text":323},{"id":413,"depth":79,"text":414},{"id":437,"depth":79,"text":438},"Create a Gonex project with the CLI, add an HTTP module, run the server and inspect JSON responses, logs and OpenAPI.","md","GETTING STARTED",{},true,20,"\u002Fdocs\u002Fmain\u002Fquick-start","build",{"title":5,"description":461},null,"docs\u002Fmain\u002Fquick-start","main","aARwb2tOZ_786plfzUZfo5h4HiXUkM3mOKuBnTA9_w8",1792521640162]