refactor: consolidate environment config and API handling

- Update database paths and port configuration
- Remove backend config.ts and sessions route
- Add mobile file preview and files API
- Clean up shared constants and provider hooks
This commit is contained in:
Chris Scott committed 2025-11-25 09:39:56 -05:00
1 parent 0db354048d
commit 8a56bc208d
32 files changed
+301 -512

No files matched your search

+4 -2
View File
@@ -1,3 +1,5 @@
import { ENV } from '../config'
type LogLevel = 'info' | 'warn' | 'error' | 'debug'
class Logger {
@@ -7,7 +9,7 @@ class Logger {
this.prefix = prefix
}
private format(level: LogLevel, message: string, ...args: unknown[]): string {
private format(level: LogLevel, message: string): string {
const timestamp = new Date().toISOString()
const prefixStr = this.prefix ? `[${this.prefix}] ` : ''
return `[${timestamp}] [${level.toUpperCase()}] ${prefixStr}${message}`
@@ -26,7 +28,7 @@ class Logger {
}
debug(message: string, ...args: unknown[]): void {
if (process.env.DEBUG) {
if (ENV.LOGGING.DEBUG) {
console.debug(this.format('debug', message), ...args)
}
}