Fix some small errors & stuff to host it on my home server now
This commit is contained in:
@@ -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"?>
|
||||
|
||||
Reference in New Issue
Block a user