working server

This commit is contained in:
2025-11-21 22:23:50 +00:00
parent c16fd804c0
commit a3a001d8e1
6 changed files with 248 additions and 119 deletions

346
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -44,7 +44,9 @@
},
"dependencies": {
"@lucia-auth/adapter-drizzle": "^1.1.0",
"@sveltejs/adapter-node": "^5.4.0",
"arctic": "^3.7.0",
"dotenv": "^17.2.3",
"lucia": "^3.2.2",
"postgres": "^3.4.7"
}

2
server.js Normal file
View File

@ -0,0 +1,2 @@
import 'dotenv/config';
import './build/index.js';

View File

@ -4,7 +4,7 @@ import { DrizzlePostgreSQLAdapter } from '@lucia-auth/adapter-drizzle';
import { db } from './db';
import { sessions, users } from './db/schema';
import { Gitea } from 'arctic';
import { GITEA_BASE_URL, GITEA_CLIENT_ID, GITEA_CLIENT_SECRET } from '$env/static/private';
import { GITEA_BASE_URL, GITEA_CLIENT_ID, GITEA_CLIENT_SECRET, CALLBACK_BASE_URL } from '$env/static/private';
const adapter = new DrizzlePostgreSQLAdapter(db, sessions, users);
@ -40,5 +40,5 @@ export const gitea = new Gitea(
GITEA_BASE_URL,
GITEA_CLIENT_ID,
GITEA_CLIENT_SECRET,
'http://localhost:5173/login/gitea/callback'
CALLBACK_BASE_URL + '/login/gitea/callback'
);

View File

@ -1,4 +1,4 @@
import adapter from '@sveltejs/adapter-auto';
import adapter from '@sveltejs/adapter-node';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').Config} */

View File

@ -1,10 +1,15 @@
import tailwindcss from '@tailwindcss/vite';
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
import { defineConfig, UserConfig } from 'vite';
export default defineConfig({
plugins: [tailwindcss(), sveltekit()],
ssr: {
noExternal: ['postgres']
}
});
},
server: {
origin: 'https://el.inv.fasttube.de',
host: '0.0.0.0',
port: 443
},
});