feat: Finishes economic balance point.

This commit is contained in:
2025-03-04 17:17:55 -05:00
parent 6c31a9db09
commit b58d053ba1
8 changed files with 226 additions and 15 deletions

View File

@@ -4,13 +4,15 @@ import Vapor
#if DEBUG
struct BrowserSyncHandler: LifecycleHandler {
func didBoot(_ application: Application) throws {
let process = Process()
process.executableURL = URL(filePath: "/bin/sh")
process.arguments = ["-c", "browser-sync reload"]
do {
try process.run()
} catch {
print("Could not auto-reload: \(error)")
if Environment.get("BROWSER_AUTO_RELOAD") != nil {
let process = Process()
process.executableURL = URL(filePath: "/bin/sh")
process.arguments = ["-c", "browser-sync reload"]
do {
try process.run()
} catch {
print("Could not auto-reload: \(error)")
}
}
}
}