diff --git a/server/src/config.mjs b/server/src/config.mjs index f23d6ac..3d68326 100644 --- a/server/src/config.mjs +++ b/server/src/config.mjs @@ -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 }) diff --git a/server/src/server.mjs b/server/src/server.mjs index 1ba3f93..023aa4b 100644 --- a/server/src/server.mjs +++ b/server/src/server.mjs @@ -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();