- docker-compose: add register-user service (profiles: [tools]) with YAML anchor to avoid env duplication - src/index.ts: show localhost instead of 0.0.0.0 in startup message - file-view: render <img> inline for image/* MIME types - file-list: add Copy link button per row (requires baseUrl param) - layout: add hideLogo option; file view page hides the logo - style.css: remove uppercase from .logo (Nanodrop not NANODROP), add button.copy-link styles, add .file-view img styles, widen last td Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
21 lines
597 B
TypeScript
21 lines
597 B
TypeScript
import { mkdirSync } from 'fs';
|
|
import { loadConfig } from './config.ts';
|
|
import { initDb } from './db/schema.ts';
|
|
import { createServer } from './server.ts';
|
|
|
|
const config = loadConfig();
|
|
|
|
mkdirSync(config.uploadDir, { recursive: true });
|
|
|
|
const db = initDb(config.dbPath);
|
|
const app = createServer({ config, db });
|
|
|
|
try {
|
|
await app.listen({ port: config.port, host: config.host });
|
|
const displayHost = config.host === '0.0.0.0' ? 'localhost' : config.host;
|
|
console.log(`Nanodrop running on http://${displayHost}:${config.port}`);
|
|
} catch (err) {
|
|
console.error(err);
|
|
process.exit(1);
|
|
}
|