- Notes: per-story rich-text notes panel (right drawer) with TipTap editor, image support, autosave, and full CRUD API - Font picker: 15 Google Fonts selectable from a floating Aa button, persisted to localStorage via --font-body CSS variable - Sticky toolbar: pulled formatting bar out of overflow:hidden wrapper so it sticks below the topbar while scrolling - Prompts: 100 additional built-in prompts (120 total) in a shuffled no-repeat queue; pre-fetch on page load so the AI has time to respond; timeout raised to 45s; error logging + /api/prompts/test debug endpoint; source badge shows whether prompt came from AI or built-in list Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
25 lines
869 B
JavaScript
25 lines
869 B
JavaScript
import express from 'express'
|
|
import path from 'path'
|
|
import { fileURLToPath } from 'url'
|
|
import authRoutes from './routes/auth.js'
|
|
import storiesRoutes from './routes/stories.js'
|
|
import imagesRoutes from './routes/images.js'
|
|
import adminRoutes from './routes/admin.js'
|
|
import promptsRoutes from './routes/prompts.js'
|
|
import notesRoutes from './routes/notes.js'
|
|
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
const app = express()
|
|
|
|
app.use(express.json({ limit: '1mb' }))
|
|
app.use('/uploads', express.static(path.join(__dirname, 'uploads')))
|
|
|
|
app.use('/api/auth', authRoutes)
|
|
app.use('/api/stories', storiesRoutes)
|
|
app.use('/api/images', imagesRoutes)
|
|
app.use('/api/admin', adminRoutes)
|
|
app.use('/api/prompts', promptsRoutes)
|
|
app.use('/api/stories/:storyId/notes', notesRoutes)
|
|
|
|
app.listen(3000, () => console.log('Server ready on :3000'))
|