Monorepo for Wisp.place. A static site hosting service built on top of the AT Protocol.

add cache dir env

Changed files
+2 -2
hosting-service
src
+1 -1
hosting-service/src/index.ts
···
import { mkdirSync, existsSync } from 'fs';
const PORT = process.env.PORT ? parseInt(process.env.PORT) : 3001;
-
const CACHE_DIR = './cache/sites';
+
const CACHE_DIR = process.env.CACHE_DIR || './cache/sites';
// Ensure cache directory exists
if (!existsSync(CACHE_DIR)) {
+1 -1
hosting-service/src/lib/utils.ts
···
import { safeFetchJson, safeFetchBlob } from './safe-fetch';
import { CID } from 'multiformats';
-
const CACHE_DIR = './cache/sites';
+
const CACHE_DIR = process.env.CACHE_DIR || './cache/sites';
const CACHE_TTL = 14 * 24 * 60 * 60 * 1000; // 14 days cache TTL
interface CacheMetadata {