--- --- Generated by EmmyLua(https://github.com/EmmyLua) --- Created by admin. --- DateTime: 2025/9/25 08:19 --- 业务逻辑 local db_config = require('config.database') local pgmoon = require('share.pgmoonn') -- 创建一个新的连接 local conn = pgmoon.new(db_config.postgres) -- 连接到数据库 conn:connect(function(err) if err then print("Error connecting to database: ", err) else print("Connected to the PostgreSQL server.") end end)