Created
October 20, 2025 18:43
-
-
Save gszr/d102e8cf50c0c92405ef6954dbfebcc0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "luarocks.loader" | |
| setmetatable(_G, nil) | |
| local config = { | |
| application_name = "kong", | |
| host = "localhost", | |
| port = 5432, | |
| user = "kong", | |
| password = nil, | |
| database = "kong", | |
| ssl = false, | |
| } | |
| local pgmoon = require "pgmoon" | |
| local db = assert(pgmoon.new(config)) | |
| assert(db:connect()) | |
| local res, err = db:query("select * from services;") --> { { dog = "hello" } } | |
| print(require"inspect"(res)) | |
| print(err) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment