summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package.json1
-rw-r--r--server.js7
2 files changed, 4 insertions, 4 deletions
diff --git a/package.json b/package.json
index 8a50d86..aa1885a 100644
--- a/package.json
+++ b/package.json
@@ -5,7 +5,6 @@
"dependencies": {
"better-sqlite3": "^9.4.1",
"bufferutil": "^4.0.8",
- "chokidar": "^3.6.0",
"dotenv": "^16.4.4",
"express": "^4.18.2",
"nodemailer": "^6.9.9",
diff --git a/server.js b/server.js
index 705eb8f..dcc6208 100644
--- a/server.js
+++ b/server.js
@@ -9,7 +9,6 @@ const https = require("https") // for webhook requests
const { WebSocketServer } = require("ws")
const express = require("express")
const url = require("url")
-const chokidar = require("chokidar")
const sqlite3 = require("better-sqlite3")
require("dotenv").config()
@@ -1197,8 +1196,10 @@ function watch_rules(rules_dir, rules_file, title) {
}
}
- // ALSO: for (let file of watch_list) fs.watchFile(file, reload_rules)
- chokidar.watch(watch_list, { ignoreInitial: true, awaitWriteFinish: true }).on("all", reload_rules)
+ // TODO: figure out why chokidar is unreliable on production server
+ // chokidar.watch(watch_list, { ignoreInitial: true, awaitWriteFinish: true }).on("all", reload_rules)
+ for (let file of watch_list)
+ fs.watchFile(file, reload_rules)
}
function load_titles() {