[{"data":1,"prerenderedAt":1524},["ShallowReactive",2],{"navigation_docs":3,"-getting-started-quickstart":134,"-getting-started-quickstart-surround":1519},[4,26,52,88,114],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":25},"Getting Started","i-lucide-rocket","\u002Fgetting-started","1.getting-started",[10,15,20],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction","i-lucide-sparkles",{"title":16,"path":17,"stem":18,"icon":19},"Quickstart","\u002Fgetting-started\u002Fquickstart","1.getting-started\u002F2.quickstart","i-lucide-play",{"title":21,"path":22,"stem":23,"icon":24},"Architecture & State","\u002Fgetting-started\u002Farchitecture","1.getting-started\u002F3.architecture","i-lucide-cpu",false,{"title":27,"icon":28,"path":29,"stem":30,"children":31,"page":25},"Serverless & Edge","i-lucide-zap","\u002Fserverless","2.serverless",[32,37,42,47],{"title":33,"path":34,"stem":35,"icon":36},"Serverless Architecture","\u002Fserverless\u002Foverview","2.serverless\u002F1.overview","i-lucide-globe",{"title":38,"path":39,"stem":40,"icon":41},"Minimal Client","\u002Fserverless\u002Fminimal-client","2.serverless\u002F2.minimal-client","i-lucide-code",{"title":43,"path":44,"stem":45,"icon":46},"Execution Modes","\u002Fserverless\u002Fexecution-modes","2.serverless\u002F3.execution-modes","i-lucide-list-tree",{"title":48,"path":49,"stem":50,"icon":51},"Timeouts & Retries","\u002Fserverless\u002Ftimeouts-and-retries","2.serverless\u002F4.timeouts-and-retries","i-lucide-alert-triangle",{"title":53,"icon":54,"path":55,"stem":56,"children":57,"page":25},"API Reference","i-lucide-terminal","\u002Fapi-reference","3.api-reference",[58,63,68,73,78,83],{"title":59,"path":60,"stem":61,"icon":62},"Protocol & Authentication","\u002Fapi-reference\u002Foverview","3.api-reference\u002F1.overview","i-lucide-key",{"title":64,"path":65,"stem":66,"icon":67},"Queries","\u002Fapi-reference\u002Fqueries","3.api-reference\u002F2.queries","i-lucide-database",{"title":69,"path":70,"stem":71,"icon":72},"Transactions","\u002Fapi-reference\u002Ftransactions","3.api-reference\u002F3.transactions","i-lucide-layers",{"title":74,"path":75,"stem":76,"icon":77},"Administration","\u002Fapi-reference\u002Fadministration","3.api-reference\u002F4.administration","i-lucide-settings",{"title":79,"path":80,"stem":81,"icon":82},"Scopes & Permissions","\u002Fapi-reference\u002Fscopes-permissions","3.api-reference\u002F5.scopes-permissions","i-lucide-shield",{"title":84,"path":85,"stem":86,"icon":87},"Errors & Diagnostics","\u002Fapi-reference\u002Ferrors","3.api-reference\u002F6.errors","i-lucide-alert-circle",{"title":89,"icon":90,"path":91,"stem":92,"children":93,"page":25},"Configuration","i-lucide-sliders","\u002Fconfiguration","4.configuration",[94,99,104,109],{"title":95,"path":96,"stem":97,"icon":98},"Gateway YAML","\u002Fconfiguration\u002Fgateway-yaml","4.configuration\u002F1.gateway-yaml","i-lucide-file-code",{"title":100,"path":101,"stem":102,"icon":103},"Connection Pools","\u002Fconfiguration\u002Fconnection-pools","4.configuration\u002F2.connection-pools","i-lucide-activity",{"title":105,"path":106,"stem":107,"icon":108},"Analytics & Observability","\u002Fconfiguration\u002Fanalytics","4.configuration\u002F3.analytics","i-lucide-bar-chart",{"title":110,"path":111,"stem":112,"icon":113},"Runtime Files & State","\u002Fconfiguration\u002Fruntime-files","4.configuration\u002F4.runtime-files","i-lucide-folder",{"title":115,"icon":116,"path":117,"stem":118,"children":119,"page":25},"Operations & Security","i-lucide-shield-check","\u002Foperations","5.operations",[120,125,129],{"title":121,"path":122,"stem":123,"icon":124},"Production Deployment","\u002Foperations\u002Fdeployment","5.operations\u002F1.deployment","i-lucide-server",{"title":126,"path":127,"stem":128,"icon":116},"Security Hardening","\u002Foperations\u002Fsecurity","5.operations\u002F2.security",{"title":130,"path":131,"stem":132,"icon":133},"Development & Contributing","\u002Foperations\u002Fdevelopment","5.operations\u002F3.development","i-lucide-code-2",{"id":135,"title":16,"body":136,"description":1510,"extension":1511,"links":1512,"meta":1513,"navigation":1514,"path":17,"seo":1515,"stem":18,"__hash__":1518},"docs\u002F1.getting-started\u002F2.quickstart.md",{"type":137,"value":138,"toc":1497},"minimark",[139,144,148,151,154,159,162,204,207,247,249,253,256,301,308,325,329,334,340,367,370,372,376,379,517,529,531,535,538,553,559,567,570,573,589,592,625,627,631,646,726,729,880,887,889,893,896,974,976,1289,1292,1294,1298,1301,1327,1330,1332,1336,1463,1465,1469,1493],[140,141,143],"h1",{"id":142},"_5-minute-quickstart","5-Minute Quickstart",[145,146,147],"p",{},"This guide starts a local HTTP PostgreSQL Gateway, configures a disposable PostgreSQL database with restricted privileges, creates a least-privilege API key, and runs an authenticated SQL query over HTTP.",[145,149,150],{},"The gateway process needs network access to PostgreSQL. Your serverless or edge application does not — it communicates with the gateway over standard HTTPS.",[152,153],"hr",{},[155,156,158],"h2",{"id":157},"_1-prerequisites","1. Prerequisites",[145,160,161],{},"Before starting, ensure your system meets the minimum requirements:",[163,164,165,186,192,198],"ul",{},[166,167,168,172,173,177,178,181,182,185],"li",{},[169,170,171],"strong",{},"Node.js",": ",[174,175,176],"code",{},"22.13+"," on the 22.x line, or ",[174,179,180],{},"23.4+",", with built-in ",[174,183,184],{},"node:sqlite"," enabled.",[166,187,188,191],{},[169,189,190],{},"npm",": Version 10 or later.",[166,193,194,197],{},[169,195,196],{},"PostgreSQL",": Version 14 or higher with administrator access.",[166,199,200,203],{},[169,201,202],{},"Redis",": Optional for local development; required for shared rate limiting across multi-process clusters.",[145,205,206],{},"Verify your Node.js and SQLite runtime:",[208,209,214],"pre",{"className":210,"code":211,"language":212,"meta":213,"style":213},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","node --version\nnode -e \"import('node:sqlite').then(() => console.log('✓ node:sqlite available'))\"\n","bash","",[174,215,216,229],{"__ignoreMap":213},[217,218,221,225],"span",{"class":219,"line":220},"line",1,[217,222,224],{"class":223},"sBMFI","node",[217,226,228],{"class":227},"sfazB"," --version\n",[217,230,232,234,237,241,244],{"class":219,"line":231},2,[217,233,224],{"class":223},[217,235,236],{"class":227}," -e",[217,238,240],{"class":239},"sMK4o"," \"",[217,242,243],{"class":227},"import('node:sqlite').then(() => console.log('✓ node:sqlite available'))",[217,245,246],{"class":239},"\"\n",[152,248],{},[155,250,252],{"id":251},"_2-install-configure","2. Install & Configure",[145,254,255],{},"Clone the repository and install dependencies:",[208,257,259],{"className":210,"code":258,"language":212,"meta":213,"style":213},"git clone https:\u002F\u002Fgithub.com\u002Fhttp-postgres\u002Fhttp-postgres.git\ncd http-postgres\nnpm ci\ncp .env.example .env\n",[174,260,261,272,281,289],{"__ignoreMap":213},[217,262,263,266,269],{"class":219,"line":220},[217,264,265],{"class":223},"git",[217,267,268],{"class":227}," clone",[217,270,271],{"class":227}," https:\u002F\u002Fgithub.com\u002Fhttp-postgres\u002Fhttp-postgres.git\n",[217,273,274,278],{"class":219,"line":231},[217,275,277],{"class":276},"s2Zo4","cd",[217,279,280],{"class":227}," http-postgres\n",[217,282,284,286],{"class":219,"line":283},3,[217,285,190],{"class":223},[217,287,288],{"class":227}," ci\n",[217,290,292,295,298],{"class":219,"line":291},4,[217,293,294],{"class":223},"cp",[217,296,297],{"class":227}," .env.example",[217,299,300],{"class":227}," .env\n",[145,302,303,304,307],{},"Configure your PostgreSQL administrator connection in ",[174,305,306],{},".env",":",[208,309,313],{"className":310,"code":311,"language":312,"meta":213,"style":213},"language-dotenv shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","DATABASE_URL=postgresql:\u002F\u002Fpostgres:postgres@127.0.0.1:5432\u002Fpostgres\nREDIS_URL=redis:\u002F\u002F127.0.0.1:6379\n","dotenv",[174,314,315,320],{"__ignoreMap":213},[217,316,317],{"class":219,"line":220},[217,318,319],{},"DATABASE_URL=postgresql:\u002F\u002Fpostgres:postgres@127.0.0.1:5432\u002Fpostgres\n",[217,321,322],{"class":219,"line":231},[217,323,324],{},"REDIS_URL=redis:\u002F\u002F127.0.0.1:6379\n",[326,327,328],"note",{},"The administrator connection is used for schema migrations, health monitoring, durable execution tracking, and provisioning restricted PostgreSQL roles for scoped API keys.",[330,331,333],"h3",{"id":332},"local-development-without-redis","Local Development Without Redis",[145,335,336,337,307],{},"If you do not have Redis running locally, disable it in ",[174,338,339],{},"gateway.yaml",[208,341,345],{"className":342,"code":343,"language":344,"meta":213,"style":213},"language-yaml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","redis:\n  enabled: false\n","yaml",[174,346,347,356],{"__ignoreMap":213},[217,348,349,353],{"class":219,"line":220},[217,350,352],{"class":351},"swJcz","redis",[217,354,355],{"class":239},":\n",[217,357,358,361,363],{"class":219,"line":231},[217,359,360],{"class":351},"  enabled",[217,362,307],{"class":239},[217,364,366],{"class":365},"sfNiH"," false\n",[145,368,369],{},"When Redis is disabled, rate limits operate in-memory local to the process.",[152,371],{},[155,373,375],{"id":374},"_3-prepare-a-disposable-database","3. Prepare a Disposable Database",[145,377,378],{},"Run the following SQL script as a PostgreSQL superuser. Use a development database where revoking public privileges is safe:",[208,380,384],{"className":381,"code":382,"language":383,"meta":213,"style":213},"language-sql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","-- Create an isolated demo database\nCREATE DATABASE gateway_demo;\n\n-- Revoke default PUBLIC connection rights\nREVOKE CONNECT ON DATABASE postgres, template1, gateway_demo FROM PUBLIC;\nGRANT CONNECT ON DATABASE gateway_demo TO postgres;\n\n\\connect gateway_demo\n\n-- Revoke default schema creation rights\nREVOKE CREATE ON SCHEMA public FROM PUBLIC;\n\n-- Create a sample table\nCREATE TABLE public.messages (\n  id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,\n  message text NOT NULL,\n  created_at timestamptz NOT NULL DEFAULT now()\n);\n\n-- Insert sample records\nINSERT INTO public.messages (message) VALUES \n  ('Hello from HTTP PostgreSQL Gateway'),\n  ('Serverless connection pooling works!');\n","sql",[174,385,386,391,396,402,407,413,419,424,430,435,441,447,452,458,464,470,476,482,488,493,499,505,511],{"__ignoreMap":213},[217,387,388],{"class":219,"line":220},[217,389,390],{},"-- Create an isolated demo database\n",[217,392,393],{"class":219,"line":231},[217,394,395],{},"CREATE DATABASE gateway_demo;\n",[217,397,398],{"class":219,"line":283},[217,399,401],{"emptyLinePlaceholder":400},true,"\n",[217,403,404],{"class":219,"line":291},[217,405,406],{},"-- Revoke default PUBLIC connection rights\n",[217,408,410],{"class":219,"line":409},5,[217,411,412],{},"REVOKE CONNECT ON DATABASE postgres, template1, gateway_demo FROM PUBLIC;\n",[217,414,416],{"class":219,"line":415},6,[217,417,418],{},"GRANT CONNECT ON DATABASE gateway_demo TO postgres;\n",[217,420,422],{"class":219,"line":421},7,[217,423,401],{"emptyLinePlaceholder":400},[217,425,427],{"class":219,"line":426},8,[217,428,429],{},"\\connect gateway_demo\n",[217,431,433],{"class":219,"line":432},9,[217,434,401],{"emptyLinePlaceholder":400},[217,436,438],{"class":219,"line":437},10,[217,439,440],{},"-- Revoke default schema creation rights\n",[217,442,444],{"class":219,"line":443},11,[217,445,446],{},"REVOKE CREATE ON SCHEMA public FROM PUBLIC;\n",[217,448,450],{"class":219,"line":449},12,[217,451,401],{"emptyLinePlaceholder":400},[217,453,455],{"class":219,"line":454},13,[217,456,457],{},"-- Create a sample table\n",[217,459,461],{"class":219,"line":460},14,[217,462,463],{},"CREATE TABLE public.messages (\n",[217,465,467],{"class":219,"line":466},15,[217,468,469],{},"  id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,\n",[217,471,473],{"class":219,"line":472},16,[217,474,475],{},"  message text NOT NULL,\n",[217,477,479],{"class":219,"line":478},17,[217,480,481],{},"  created_at timestamptz NOT NULL DEFAULT now()\n",[217,483,485],{"class":219,"line":484},18,[217,486,487],{},");\n",[217,489,491],{"class":219,"line":490},19,[217,492,401],{"emptyLinePlaceholder":400},[217,494,496],{"class":219,"line":495},20,[217,497,498],{},"-- Insert sample records\n",[217,500,502],{"class":219,"line":501},21,[217,503,504],{},"INSERT INTO public.messages (message) VALUES \n",[217,506,508],{"class":219,"line":507},22,[217,509,510],{},"  ('Hello from HTTP PostgreSQL Gateway'),\n",[217,512,514],{"class":219,"line":513},23,[217,515,516],{},"  ('Serverless connection pooling works!');\n",[518,519,520,521,524,525,528],"warning",{},"PostgreSQL privileges are ",[169,522,523],{},"additive",". Because ",[174,526,527],{},"PUBLIC"," has default access in PostgreSQL, revoking public access is necessary. The gateway rejects creating narrow scopes if broader inherited grants make them unsafe.",[152,530],{},[155,532,534],{"id":533},"_4-start-the-gateway","4. Start the Gateway",[145,536,537],{},"Start the development server with live reload:",[208,539,541],{"className":210,"code":540,"language":212,"meta":213,"style":213},"npm run dev\n",[174,542,543],{"__ignoreMap":213},[217,544,545,547,550],{"class":219,"line":220},[217,546,190],{"class":223},[217,548,549],{"class":227}," run",[217,551,552],{"class":227}," dev\n",[145,554,555,556,307],{},"During the very first startup, the gateway generates and prints a ",[169,557,558],{},"secure administrator password",[208,560,565],{"className":561,"code":563,"language":564,"meta":213},[562],"language-text","==================================================================\n  GENERATED GATEWAY ADMIN PASSWORD:\n  a7e8f9b2c3d4e5f60123456789abcdef...\n==================================================================\n","text",[174,566,563],{"__ignoreMap":213},[518,568,569],{},"Save this password immediately in your password manager! The gateway stores only a cryptographic hash and will never print the raw password again.",[145,571,572],{},"In another terminal, test the unauthenticated public liveness route:",[208,574,576],{"className":210,"code":575,"language":212,"meta":213,"style":213},"curl --fail-with-body http:\u002F\u002Flocalhost:8080\u002Fhealth\n",[174,577,578],{"__ignoreMap":213},[217,579,580,583,586],{"class":219,"line":220},[217,581,582],{"class":223},"curl",[217,584,585],{"class":227}," --fail-with-body",[217,587,588],{"class":227}," http:\u002F\u002Flocalhost:8080\u002Fhealth\n",[145,590,591],{},"Expected response:",[208,593,597],{"className":594,"code":595,"language":596,"meta":213,"style":213},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\"status\":\"ok\"}\n","json",[174,598,599],{"__ignoreMap":213},[217,600,601,604,607,611,613,615,617,620,622],{"class":219,"line":220},[217,602,603],{"class":239},"{",[217,605,606],{"class":239},"\"",[217,608,610],{"class":609},"spNyl","status",[217,612,606],{"class":239},[217,614,307],{"class":239},[217,616,606],{"class":239},[217,618,619],{"class":227},"ok",[217,621,606],{"class":239},[217,623,624],{"class":239},"}\n",[152,626],{},[155,628,630],{"id":629},"_5-create-a-scoped-api-key","5. Create a Scoped API Key",[145,632,633,634,637,638,641,642,645],{},"Generate an API key with read-only (",[174,635,636],{},"r",") access to the ",[174,639,640],{},"public.messages"," table. Replace ",[174,643,644],{},"\u003Cadmin-password>"," with the password saved from Step 4:",[208,647,649],{"className":210,"code":648,"language":212,"meta":213,"style":213},"curl --fail-with-body http:\u002F\u002Flocalhost:8080\u002Fadmin\u002Fkeys \\\n  -H 'x-admin: \u003Cadmin-password>' \\\n  -H 'content-type: application\u002Fjson' \\\n  -d '{\n    \"database\": [\"gateway_demo\"],\n    \"tables\": [\"public.messages\"],\n    \"scope-table\": [\"r\"]\n  }'\n",[174,650,651,664,680,693,703,708,713,718],{"__ignoreMap":213},[217,652,653,655,657,660],{"class":219,"line":220},[217,654,582],{"class":223},[217,656,585],{"class":227},[217,658,659],{"class":227}," http:\u002F\u002Flocalhost:8080\u002Fadmin\u002Fkeys",[217,661,663],{"class":662},"sTEyZ"," \\\n",[217,665,666,669,672,675,678],{"class":219,"line":231},[217,667,668],{"class":227},"  -H",[217,670,671],{"class":239}," '",[217,673,674],{"class":227},"x-admin: \u003Cadmin-password>",[217,676,677],{"class":239},"'",[217,679,663],{"class":662},[217,681,682,684,686,689,691],{"class":219,"line":283},[217,683,668],{"class":227},[217,685,671],{"class":239},[217,687,688],{"class":227},"content-type: application\u002Fjson",[217,690,677],{"class":239},[217,692,663],{"class":662},[217,694,695,698,700],{"class":219,"line":291},[217,696,697],{"class":227},"  -d",[217,699,671],{"class":239},[217,701,702],{"class":227},"{\n",[217,704,705],{"class":219,"line":409},[217,706,707],{"class":227},"    \"database\": [\"gateway_demo\"],\n",[217,709,710],{"class":219,"line":415},[217,711,712],{"class":227},"    \"tables\": [\"public.messages\"],\n",[217,714,715],{"class":219,"line":421},[217,716,717],{"class":227},"    \"scope-table\": [\"r\"]\n",[217,719,720,723],{"class":219,"line":426},[217,721,722],{"class":227},"  }",[217,724,725],{"class":239},"'\n",[145,727,728],{},"Response:",[208,730,732],{"className":594,"code":731,"language":596,"meta":213,"style":213},"{\n  \"success\": true,\n  \"data\": {\n    \"id\": \"key_01jh9x8q...\",\n    \"apiKey\": \"pg_gw_live_9a8b7c6d5e...\",\n    \"environment\": \"LIVE\",\n    \"databases\": [\"gateway_demo\"],\n    \"createdAt\": \"2026-11-23T06:00:00.000Z\"\n  }\n}\n",[174,733,734,738,753,767,789,809,829,853,871,876],{"__ignoreMap":213},[217,735,736],{"class":219,"line":220},[217,737,702],{"class":239},[217,739,740,743,746,748,750],{"class":219,"line":231},[217,741,742],{"class":239},"  \"",[217,744,745],{"class":609},"success",[217,747,606],{"class":239},[217,749,307],{"class":239},[217,751,752],{"class":239}," true,\n",[217,754,755,757,760,762,764],{"class":219,"line":283},[217,756,742],{"class":239},[217,758,759],{"class":609},"data",[217,761,606],{"class":239},[217,763,307],{"class":239},[217,765,766],{"class":239}," {\n",[217,768,769,772,775,777,779,781,784,786],{"class":219,"line":291},[217,770,771],{"class":239},"    \"",[217,773,774],{"class":223},"id",[217,776,606],{"class":239},[217,778,307],{"class":239},[217,780,240],{"class":239},[217,782,783],{"class":227},"key_01jh9x8q...",[217,785,606],{"class":239},[217,787,788],{"class":239},",\n",[217,790,791,793,796,798,800,802,805,807],{"class":219,"line":409},[217,792,771],{"class":239},[217,794,795],{"class":223},"apiKey",[217,797,606],{"class":239},[217,799,307],{"class":239},[217,801,240],{"class":239},[217,803,804],{"class":227},"pg_gw_live_9a8b7c6d5e...",[217,806,606],{"class":239},[217,808,788],{"class":239},[217,810,811,813,816,818,820,822,825,827],{"class":219,"line":415},[217,812,771],{"class":239},[217,814,815],{"class":223},"environment",[217,817,606],{"class":239},[217,819,307],{"class":239},[217,821,240],{"class":239},[217,823,824],{"class":227},"LIVE",[217,826,606],{"class":239},[217,828,788],{"class":239},[217,830,831,833,836,838,840,843,845,848,850],{"class":219,"line":421},[217,832,771],{"class":239},[217,834,835],{"class":223},"databases",[217,837,606],{"class":239},[217,839,307],{"class":239},[217,841,842],{"class":239}," [",[217,844,606],{"class":239},[217,846,847],{"class":227},"gateway_demo",[217,849,606],{"class":239},[217,851,852],{"class":239},"],\n",[217,854,855,857,860,862,864,866,869],{"class":219,"line":426},[217,856,771],{"class":239},[217,858,859],{"class":223},"createdAt",[217,861,606],{"class":239},[217,863,307],{"class":239},[217,865,240],{"class":239},[217,867,868],{"class":227},"2026-11-23T06:00:00.000Z",[217,870,246],{"class":239},[217,872,873],{"class":219,"line":432},[217,874,875],{"class":239},"  }\n",[217,877,878],{"class":219,"line":437},[217,879,624],{"class":239},[518,881,882,883,886],{},"Copy and store ",[174,884,885],{},"data.apiKey"," immediately. Subsequent key list queries return metadata only, never the original secret key.",[152,888],{},[155,890,892],{"id":891},"_6-run-your-first-http-query","6. Run Your First HTTP Query",[145,894,895],{},"Execute a parameterized SQL query using the scoped API key:",[208,897,899],{"className":210,"code":898,"language":212,"meta":213,"style":213},"curl --fail-with-body http:\u002F\u002Flocalhost:8080\u002Fquery \\\n  -H 'x-api-key: \u003Capi-key>' \\\n  -H 'x-database: gateway_demo' \\\n  -H 'content-type: application\u002Fjson' \\\n  -d '{\n    \"query\": \"SELECT id, message, created_at FROM public.messages WHERE id = $1\",\n    \"parameters\": [1]\n  }'\n",[174,900,901,912,925,938,950,958,963,968],{"__ignoreMap":213},[217,902,903,905,907,910],{"class":219,"line":220},[217,904,582],{"class":223},[217,906,585],{"class":227},[217,908,909],{"class":227}," http:\u002F\u002Flocalhost:8080\u002Fquery",[217,911,663],{"class":662},[217,913,914,916,918,921,923],{"class":219,"line":231},[217,915,668],{"class":227},[217,917,671],{"class":239},[217,919,920],{"class":227},"x-api-key: \u003Capi-key>",[217,922,677],{"class":239},[217,924,663],{"class":662},[217,926,927,929,931,934,936],{"class":219,"line":283},[217,928,668],{"class":227},[217,930,671],{"class":239},[217,932,933],{"class":227},"x-database: gateway_demo",[217,935,677],{"class":239},[217,937,663],{"class":662},[217,939,940,942,944,946,948],{"class":219,"line":291},[217,941,668],{"class":227},[217,943,671],{"class":239},[217,945,688],{"class":227},[217,947,677],{"class":239},[217,949,663],{"class":662},[217,951,952,954,956],{"class":219,"line":409},[217,953,697],{"class":227},[217,955,671],{"class":239},[217,957,702],{"class":227},[217,959,960],{"class":219,"line":415},[217,961,962],{"class":227},"    \"query\": \"SELECT id, message, created_at FROM public.messages WHERE id = $1\",\n",[217,964,965],{"class":219,"line":421},[217,966,967],{"class":227},"    \"parameters\": [1]\n",[217,969,970,972],{"class":219,"line":426},[217,971,722],{"class":227},[217,973,725],{"class":239},[145,975,728],{},[208,977,979],{"className":594,"code":978,"language":596,"meta":213,"style":213},"{\n  \"success\": true,\n  \"data\": {\n    \"database\": \"gateway_demo\",\n    \"command\": \"SELECT\",\n    \"rowCount\": 1,\n    \"rows\": [\n      {\n        \"id\": 1,\n        \"message\": \"Hello from HTTP PostgreSQL Gateway\",\n        \"created_at\": \"2026-11-23T06:00:00.000Z\"\n      }\n    ],\n    \"fields\": [\n      {\"name\": \"id\", \"dataTypeID\": 20},\n      {\"name\": \"message\", \"dataTypeID\": 25},\n      {\"name\": \"created_at\", \"dataTypeID\": 1184}\n    ],\n    \"durationMs\": 3.42\n  }\n}\n",[174,980,981,985,997,1009,1028,1048,1065,1079,1084,1099,1119,1136,1141,1146,1159,1197,1230,1263,1267,1281,1285],{"__ignoreMap":213},[217,982,983],{"class":219,"line":220},[217,984,702],{"class":239},[217,986,987,989,991,993,995],{"class":219,"line":231},[217,988,742],{"class":239},[217,990,745],{"class":609},[217,992,606],{"class":239},[217,994,307],{"class":239},[217,996,752],{"class":239},[217,998,999,1001,1003,1005,1007],{"class":219,"line":283},[217,1000,742],{"class":239},[217,1002,759],{"class":609},[217,1004,606],{"class":239},[217,1006,307],{"class":239},[217,1008,766],{"class":239},[217,1010,1011,1013,1016,1018,1020,1022,1024,1026],{"class":219,"line":291},[217,1012,771],{"class":239},[217,1014,1015],{"class":223},"database",[217,1017,606],{"class":239},[217,1019,307],{"class":239},[217,1021,240],{"class":239},[217,1023,847],{"class":227},[217,1025,606],{"class":239},[217,1027,788],{"class":239},[217,1029,1030,1032,1035,1037,1039,1041,1044,1046],{"class":219,"line":409},[217,1031,771],{"class":239},[217,1033,1034],{"class":223},"command",[217,1036,606],{"class":239},[217,1038,307],{"class":239},[217,1040,240],{"class":239},[217,1042,1043],{"class":227},"SELECT",[217,1045,606],{"class":239},[217,1047,788],{"class":239},[217,1049,1050,1052,1055,1057,1059,1063],{"class":219,"line":415},[217,1051,771],{"class":239},[217,1053,1054],{"class":223},"rowCount",[217,1056,606],{"class":239},[217,1058,307],{"class":239},[217,1060,1062],{"class":1061},"sbssI"," 1",[217,1064,788],{"class":239},[217,1066,1067,1069,1072,1074,1076],{"class":219,"line":421},[217,1068,771],{"class":239},[217,1070,1071],{"class":223},"rows",[217,1073,606],{"class":239},[217,1075,307],{"class":239},[217,1077,1078],{"class":239}," [\n",[217,1080,1081],{"class":219,"line":426},[217,1082,1083],{"class":239},"      {\n",[217,1085,1086,1089,1091,1093,1095,1097],{"class":219,"line":432},[217,1087,1088],{"class":239},"        \"",[217,1090,774],{"class":1061},[217,1092,606],{"class":239},[217,1094,307],{"class":239},[217,1096,1062],{"class":1061},[217,1098,788],{"class":239},[217,1100,1101,1103,1106,1108,1110,1112,1115,1117],{"class":219,"line":437},[217,1102,1088],{"class":239},[217,1104,1105],{"class":1061},"message",[217,1107,606],{"class":239},[217,1109,307],{"class":239},[217,1111,240],{"class":239},[217,1113,1114],{"class":227},"Hello from HTTP PostgreSQL Gateway",[217,1116,606],{"class":239},[217,1118,788],{"class":239},[217,1120,1121,1123,1126,1128,1130,1132,1134],{"class":219,"line":443},[217,1122,1088],{"class":239},[217,1124,1125],{"class":1061},"created_at",[217,1127,606],{"class":239},[217,1129,307],{"class":239},[217,1131,240],{"class":239},[217,1133,868],{"class":227},[217,1135,246],{"class":239},[217,1137,1138],{"class":219,"line":449},[217,1139,1140],{"class":239},"      }\n",[217,1142,1143],{"class":219,"line":454},[217,1144,1145],{"class":239},"    ],\n",[217,1147,1148,1150,1153,1155,1157],{"class":219,"line":460},[217,1149,771],{"class":239},[217,1151,1152],{"class":223},"fields",[217,1154,606],{"class":239},[217,1156,307],{"class":239},[217,1158,1078],{"class":239},[217,1160,1161,1164,1166,1169,1171,1173,1175,1177,1179,1182,1184,1187,1189,1191,1194],{"class":219,"line":466},[217,1162,1163],{"class":239},"      {",[217,1165,606],{"class":239},[217,1167,1168],{"class":1061},"name",[217,1170,606],{"class":239},[217,1172,307],{"class":239},[217,1174,240],{"class":239},[217,1176,774],{"class":227},[217,1178,606],{"class":239},[217,1180,1181],{"class":239},",",[217,1183,240],{"class":239},[217,1185,1186],{"class":1061},"dataTypeID",[217,1188,606],{"class":239},[217,1190,307],{"class":239},[217,1192,1193],{"class":1061}," 20",[217,1195,1196],{"class":239},"},\n",[217,1198,1199,1201,1203,1205,1207,1209,1211,1213,1215,1217,1219,1221,1223,1225,1228],{"class":219,"line":472},[217,1200,1163],{"class":239},[217,1202,606],{"class":239},[217,1204,1168],{"class":1061},[217,1206,606],{"class":239},[217,1208,307],{"class":239},[217,1210,240],{"class":239},[217,1212,1105],{"class":227},[217,1214,606],{"class":239},[217,1216,1181],{"class":239},[217,1218,240],{"class":239},[217,1220,1186],{"class":1061},[217,1222,606],{"class":239},[217,1224,307],{"class":239},[217,1226,1227],{"class":1061}," 25",[217,1229,1196],{"class":239},[217,1231,1232,1234,1236,1238,1240,1242,1244,1246,1248,1250,1252,1254,1256,1258,1261],{"class":219,"line":478},[217,1233,1163],{"class":239},[217,1235,606],{"class":239},[217,1237,1168],{"class":1061},[217,1239,606],{"class":239},[217,1241,307],{"class":239},[217,1243,240],{"class":239},[217,1245,1125],{"class":227},[217,1247,606],{"class":239},[217,1249,1181],{"class":239},[217,1251,240],{"class":239},[217,1253,1186],{"class":1061},[217,1255,606],{"class":239},[217,1257,307],{"class":239},[217,1259,1260],{"class":1061}," 1184",[217,1262,624],{"class":239},[217,1264,1265],{"class":219,"line":484},[217,1266,1145],{"class":239},[217,1268,1269,1271,1274,1276,1278],{"class":219,"line":490},[217,1270,771],{"class":239},[217,1272,1273],{"class":223},"durationMs",[217,1275,606],{"class":239},[217,1277,307],{"class":239},[217,1279,1280],{"class":1061}," 3.42\n",[217,1282,1283],{"class":219,"line":495},[217,1284,875],{"class":239},[217,1286,1287],{"class":219,"line":501},[217,1288,624],{"class":239},[145,1290,1291],{},"Notice that parameters are passed safely as an array, eliminating SQL injection risks and keeping untrusted values out of analytics logs.",[152,1293],{},[155,1295,1297],{"id":1296},"_7-inspect-operational-health","7. Inspect Operational Health",[145,1299,1300],{},"Run a deep health inspection of all gateway subsystems:",[208,1302,1304],{"className":210,"code":1303,"language":212,"meta":213,"style":213},"curl --fail-with-body http:\u002F\u002Flocalhost:8080\u002Fadmin\u002Fhealth \\\n  -H 'x-admin: \u003Cadmin-password>'\n",[174,1305,1306,1317],{"__ignoreMap":213},[217,1307,1308,1310,1312,1315],{"class":219,"line":220},[217,1309,582],{"class":223},[217,1311,585],{"class":227},[217,1313,1314],{"class":227}," http:\u002F\u002Flocalhost:8080\u002Fadmin\u002Fhealth",[217,1316,663],{"class":662},[217,1318,1319,1321,1323,1325],{"class":219,"line":231},[217,1320,668],{"class":227},[217,1322,671],{"class":239},[217,1324,674],{"class":227},[217,1326,725],{"class":239},[145,1328,1329],{},"This returns metrics for PostgreSQL connectivity, pool utilization, unverified connection age, and storage subsystems.",[152,1331],{},[155,1333,1335],{"id":1334},"startup-troubleshooting","Startup Troubleshooting",[1337,1338,1339,1356],"table",{},[1340,1341,1342],"thead",{},[1343,1344,1345,1350,1353],"tr",{},[1346,1347,1349],"th",{"align":1348},"left","Symptom",[1346,1351,1352],{"align":1348},"Cause",[1346,1354,1355],{"align":1348},"Resolution",[1357,1358,1359,1378,1398,1416,1436],"tbody",{},[1343,1360,1361,1367,1370],{},[1362,1363,1364],"td",{"align":1348},[174,1365,1366],{},"node:sqlite requirement error",[1362,1368,1369],{"align":1348},"Node.js is outdated or built without SQLite",[1362,1371,1372,1373,1375,1376],{"align":1348},"Upgrade to Node.js ",[174,1374,176],{}," or ",[174,1377,180],{},[1343,1379,1380,1385,1388],{},[1362,1381,1382],{"align":1348},[174,1383,1384],{},"Failed to connect to PostgreSQL",[1362,1386,1387],{"align":1348},"Incorrect credentials or database offline",[1362,1389,1390,1391,1394,1395,1397],{"align":1348},"Check ",[174,1392,1393],{},"DATABASE_URL"," in ",[174,1396,306],{}," and verify PostgreSQL service status",[1343,1399,1400,1405,1408],{},[1362,1401,1402],{"align":1348},[174,1403,1404],{},"Redis connection error",[1362,1406,1407],{"align":1348},"Redis is unreachable",[1362,1409,1410,1411,1394,1414],{"align":1348},"Start Redis or set ",[174,1412,1413],{},"redis.enabled: false",[174,1415,339],{},[1343,1417,1418,1423,1428],{},[1362,1419,1420],{"align":1348},[174,1421,1422],{},"Missing environment variable",[1362,1424,1425,1426],{"align":1348},"Variable not defined in ",[174,1427,306],{},[1362,1429,1430,1431,1394,1434],{"align":1348},"Add the variable or specify a fallback ",[174,1432,1433],{},"${VAR:-fallback}",[174,1435,339],{},[1343,1437,1438,1443,1449],{},[1362,1439,1440],{"align":1348},[174,1441,1442],{},"UNSAFE_DATABASE_SCOPE (409)",[1362,1444,1445,1446,1448],{"align":1348},"PostgreSQL ",[174,1447,527],{}," grants are too broad",[1362,1450,1451,1452,1455,1456,1459,1460,1462],{"align":1348},"Revoke ",[174,1453,1454],{},"CONNECT"," and ",[174,1457,1458],{},"CREATE"," privileges from ",[174,1461,527],{}," on the target database",[152,1464],{},[155,1466,1468],{"id":1467},"whats-next","What's Next?",[163,1470,1471,1479,1486],{},[166,1472,1473,1474,1478],{},"Integrate with your frontend or serverless framework in ",[1475,1476,1477],"a",{"href":39},"Serverless Integration",".",[166,1480,1481,1482,1485],{},"Learn how ",[1475,1483,1484],{"href":80},"CRUD Scopes"," protect your data.",[166,1487,1488,1489,1492],{},"Explore ",[1475,1490,1491],{"href":70},"Atomic Transactions"," with idempotency keys.",[1494,1495,1496],"style",{},"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 .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":213,"searchDepth":231,"depth":231,"links":1498},[1499,1500,1503,1504,1505,1506,1507,1508,1509],{"id":157,"depth":231,"text":158},{"id":251,"depth":231,"text":252,"children":1501},[1502],{"id":332,"depth":283,"text":333},{"id":374,"depth":231,"text":375},{"id":533,"depth":231,"text":534},{"id":629,"depth":231,"text":630},{"id":891,"depth":231,"text":892},{"id":1296,"depth":231,"text":1297},{"id":1334,"depth":231,"text":1335},{"id":1467,"depth":231,"text":1468},"Get up and running with HTTP PostgreSQL Gateway in under 5 minutes.","md",null,{},{"icon":19},{"title":1516,"description":1517},"Quickstart · HTTP PostgreSQL Gateway","Step-by-step setup guide — install the gateway, configure a test database, create a scoped API key, and execute your first query.","CKQ7eR7sO_7zhpuWBBVcAWQd8Zrr7IIuJY9woWdcKio",[1520,1522],{"title":11,"path":12,"stem":13,"description":1521,"icon":14,"children":-1},"Overview of HTTP PostgreSQL Gateway — connecting serverless and edge workloads to PostgreSQL safely over HTTP.",{"title":21,"path":22,"stem":23,"description":1523,"icon":24,"children":-1},"In-depth technical architecture, state boundaries, dual-pool model, and scaling boundaries.",1795399272865]