Primeiro commit

This commit is contained in:
joao.herculano
2026-08-06 11:13:33 -03:00
commit 4e1ebe861c
110 changed files with 18052 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
export const sessionConfig = {
password: process.env["SESSION_SECRET"] || "",
name: "slalog-session",
maxAge: 60 * 60 * 12,
cookie: {
httpOnly: true,
sameSite: "lax" as const,
path: "/",
secure: process.env["NODE_ENV"] === "production",
},
};
export interface SessionUser {
userId: string;
}
export function assertSessionConfig() {
if (!sessionConfig.password || sessionConfig.password.length < 32) {
throw new Error("SESSION_SECRET must be set with at least 32 characters.");
}
}