Skip to content

Commit

Permalink
Also prune cache when .env reload
Browse files Browse the repository at this point in the history
  • Loading branch information
willnode committed Oct 18, 2024
1 parent 87220a2 commit 9c1e37f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import {plainServer, secureServer} from "./index.js";
import { plainServer, secureServer } from "./index.js";
import { pruneCache as pruneCacheSni } from "./src/sni.js";
import { pruneCache as pruneCacheClient } from "./src/client.js";
import { clearConfig } from "./src/util.js";
import fs from "fs";
import { watch } from "chokidar";
Expand All @@ -21,6 +23,8 @@ function reloadEnv() {
watch('.env').on('change', () => {
console.log('.env file changed, reloading...');
clearConfig();
pruneCacheClient();
pruneCacheSni();
reloadEnv();
});

Expand Down

0 comments on commit 9c1e37f

Please sign in to comment.