Loading packages/server/src/api.ts +1 −3 Original line number Diff line number Diff line Loading @@ -3,9 +3,7 @@ import { prisma } from "./lib/prisma"; const app = Router(); const AUTH_ENDPOINT = "https://auth.fediverse.events"; const AUTH_CLIENT = "canvas"; const AUTH_SECRET = "secret"; const { AUTH_ENDPOINT, AUTH_CLIENT, AUTH_SECRET } = process.env; app.get("/me", (req, res) => { res.json(req.session); Loading packages/server/src/index.ts +15 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,21 @@ if (!process.env.REDIS_SESSION_PREFIX) { ); } if (!process.env.AUTH_ENDPOINT) { Logger.error("AUTH_ENDPOINT is not defined"); process.exit(1); } if (!process.env.AUTH_CLIENT) { Logger.error("AUTH_CLIENT is not defined"); process.exit(1); } if (!process.env.AUTH_SECRET) { Logger.error("AUTH_SECRET is not defined"); process.exit(1); } Redis.connect(); const express = new ExpressServer(); Loading packages/server/src/types.ts +4 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,10 @@ declare global { * If set, use this relative path to serve the admin UI at /admin */ SERVE_ADMIN?: string; AUTH_ENDPOINT: string; AUTH_CLIENT: string; AUTH_SECRET: string; } } } Loading
packages/server/src/api.ts +1 −3 Original line number Diff line number Diff line Loading @@ -3,9 +3,7 @@ import { prisma } from "./lib/prisma"; const app = Router(); const AUTH_ENDPOINT = "https://auth.fediverse.events"; const AUTH_CLIENT = "canvas"; const AUTH_SECRET = "secret"; const { AUTH_ENDPOINT, AUTH_CLIENT, AUTH_SECRET } = process.env; app.get("/me", (req, res) => { res.json(req.session); Loading
packages/server/src/index.ts +15 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,21 @@ if (!process.env.REDIS_SESSION_PREFIX) { ); } if (!process.env.AUTH_ENDPOINT) { Logger.error("AUTH_ENDPOINT is not defined"); process.exit(1); } if (!process.env.AUTH_CLIENT) { Logger.error("AUTH_CLIENT is not defined"); process.exit(1); } if (!process.env.AUTH_SECRET) { Logger.error("AUTH_SECRET is not defined"); process.exit(1); } Redis.connect(); const express = new ExpressServer(); Loading
packages/server/src/types.ts +4 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,10 @@ declare global { * If set, use this relative path to serve the admin UI at /admin */ SERVE_ADMIN?: string; AUTH_ENDPOINT: string; AUTH_CLIENT: string; AUTH_SECRET: string; } } }