Fix some small errors & stuff to host it on my home server now

This commit is contained in:
2025-12-18 12:42:09 -06:00
parent 677aab4175
commit 0aba66d3df
6 changed files with 28 additions and 10 deletions

View File

@@ -1,13 +1,18 @@
import * as fs from 'node:fs';
import * as path from 'node:path';
import { fileURLToPath } from 'node:url';
import 'dotenv/config';
// Get the current file's directory
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
if (!process.env.VITE_BANG_URL) {
console.error('VITE_BANG_URL environment variable must be set.');
}
// Get the Bang URL from environment or use a default for local development
const bangUrl = process.env.VITE_BANG_URL || 'https://bang.gibbyb.com';
const bangUrl = process.env.VITE_BANG_URL;
// Create the OpenSearch XML content
const openSearchXml = `<?xml version="1.0" encoding="UTF-8"?>