import fs and watchFile in one line.

This commit is contained in:
ybouane 2024-10-11 11:23:18 -04:00
parent 1d799477fb
commit f3454f2014

View file

@ -1,5 +1,4 @@
import fs from 'fs/promises'; import {promises as fs, watchFile} from 'fs';
import {watchFile} from 'fs';
let config = (await import('./config.js')).default; let config = (await import('./config.js')).default;
watchFile('./config.js', async ()=>{ // Dynamically reload config and watch it for changes. watchFile('./config.js', async ()=>{ // Dynamically reload config and watch it for changes.