V 0.1.1 intermediate changes

Co-authored-by: Oscar Urselli <oscar0urselli@users.noreply.github.com>
This commit is contained in:
Christian Risi
2025-07-03 18:25:50 +00:00
parent 19457d97ae
commit f23cb0e1d2
33 changed files with 603 additions and 56 deletions

View File

@@ -0,0 +1,27 @@
import { describe, it, expect } from 'vitest';
import { watch } from "node:fs"
import * as readline from "node:readline"
// TODO: make tests for Database
describe('watch nginx', () => {
const OPTIONS = {
recursive: true
}
const NGINX_BASE = "/etc/nginx"
const input = readline.createInterface({
input: process.stdin,
output: process.stdout,
})
watch(NGINX_BASE, OPTIONS, (eventType, filename) => {
console.log(`event: ${eventType}`)
console.log(`file: ${filename}`)
})
console.log("Done")
});