forked from admin/zeropost-engine
feat: articles — публичный блог zeropost.ru
- БД: таблица articles (slug, title, excerpt, content, cover, tags, SEO) - services/articles.js: slugify (ru→en транслит), reading_time, генерация со встроенным blog-channel - routes/articles.js: GET list/tags/:slug, POST /generate - Универсальный blogChannel со стилем для лонгридов: tone:friendly, structure:headers, без эмодзи и хэштегов - generateAndSaveArticle: вытаскивает title из H1, генерит excerpt, считает время чтения
This commit is contained in:
@@ -6,6 +6,7 @@ const { migrate } = require('./src/config/db');
|
||||
const generateRoutes = require('./src/routes/generate');
|
||||
const channelsRoutes = require('./src/routes/channels');
|
||||
const postsRoutes = require('./src/routes/posts');
|
||||
const articlesRoutes = require('./src/routes/articles');
|
||||
|
||||
// Start queue worker
|
||||
require('./src/workers/generation');
|
||||
@@ -25,6 +26,7 @@ app.use((req, res, next) => {
|
||||
app.use('/api/generate', generateRoutes);
|
||||
app.use('/api/channels', channelsRoutes);
|
||||
app.use('/api/posts', postsRoutes);
|
||||
app.use('/api/articles', articlesRoutes);
|
||||
|
||||
app.get('/health', (req, res) => {
|
||||
res.json({ ok: true, service: 'zeropost-engine', time: new Date() });
|
||||
|
||||
Reference in New Issue
Block a user