Fixed paths

This commit is contained in:
2026-06-24 13:35:33 -04:00
parent 04d5b44f87
commit 22c391a41c
2 changed files with 3 additions and 3 deletions

View File

@@ -2,7 +2,7 @@ import { config } from 'dotenv'
import { resolve, dirname } from 'path'
import { fileURLToPath } from 'url'
const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..')
const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '../..')
export function cfg() {
config({ path: resolve(ROOT, '.env'), override: true })

View File

@@ -14,10 +14,10 @@ import {refreshForecast} from './forecast.mjs';
const app = express();
const DIR = dirname(fileURLToPath(import.meta.url));
const CLIENT_DIST = resolve(DIR, 'public');
const CLIENT_DIST = resolve(DIR, '../public');
app.use(express.json());
app.use('/icons', express.static(resolve(DIR, 'public', 'icons')));
app.use('/icons', express.static(resolve(DIR, '../public', 'icons')));
app.use((req, res, next) => {
res.setHeader('Access-Control-Allow-Origin', '*');
next();