feat: ONLYOFFICE inline editor integration with JWT auth and docker-compose
This commit is contained in:
@@ -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}`);
|
||||
});
|
||||
Reference in New Issue
Block a user