feat: add frontend UI for SimpleNote Web
- Vanilla JS frontend with dark theme - Dashboard with sidebar (libraries tree, tags), document grid, search - Document viewer with markdown rendering and metadata panel - Document editor with split write/preview and formatting toolbar - Login screen with token authentication - All styled according to UI/UX specs (dark theme, accent #00d4aa) - API client for all endpoints - Responsive design
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
import express from 'express';
|
||||
import cors from 'cors';
|
||||
import { join, dirname } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import config from './config/index.js';
|
||||
import { createApiRouter } from './routes/index.js';
|
||||
import { errorHandler } from './middleware/errorHandler.js';
|
||||
@@ -13,6 +15,9 @@ import { ensureDir } from './utils/fsHelper.js';
|
||||
|
||||
const app = express();
|
||||
|
||||
// Serve static files from public/
|
||||
app.use(express.static(join(dirname(fileURLToPath(import.meta.url)), '..', 'public')));
|
||||
|
||||
// Middleware
|
||||
app.use(cors({ origin: config.corsOrigin }));
|
||||
app.use(express.json({ limit: '10mb' }));
|
||||
|
||||
Reference in New Issue
Block a user