feat: ONLYOFFICE inline editor integration with JWT auth and docker-compose

This commit is contained in:
root
2026-07-16 10:30:13 +00:00
parent 5353fb2b4e
commit 9603576dd0
8 changed files with 888 additions and 3 deletions

View File

@@ -1,11 +1,13 @@
/**
* Carbone Express Server - Standalone microservice
* Runs on port 8771 alongside the FastAPI app on 8770
* Also serves ONLYOFFICE callback endpoints
*/
const express = require('express');
const cors = require('cors');
const path = require('path');
const { router } = require('./carbone-service');
const onlyofficeRouter = require('./onlyoffice-service');
const app = express();
const PORT = 8771;
@@ -16,9 +18,12 @@ app.use(express.json({ limit: '50mb' }));
// Mount Carbone routes
app.use('/api/carbone', router);
// Mount ONLYOFFICE routes
app.use('/api/onlyoffice', onlyofficeRouter);
// Health check
app.get('/health', (req, res) => res.json({ status: 'ok', service: 'carbone' }));
app.get('/health', (req, res) => res.json({ status: 'ok', service: 'carbone+onlyoffice' }));
app.listen(PORT, '0.0.0.0', () => {
console.log(`Carbone service running on http://0.0.0.0:${PORT}`);
console.log(`Carbone + ONLYOFFICE service running on http://0.0.0.0:${PORT}`);
});