nyxora 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gateway/server.js +2 -2
- package/package.json +1 -1
- package/src/gateway/server.ts +2 -2
package/dist/gateway/server.js
CHANGED
|
@@ -66,7 +66,7 @@ const app = (0, express_1.default)();
|
|
|
66
66
|
app.use((0, cors_1.default)());
|
|
67
67
|
app.use(express_1.default.json());
|
|
68
68
|
// Serve static frontend from dashboard/dist
|
|
69
|
-
app.use(express_1.default.static(path_1.default.join(__dirname, '
|
|
69
|
+
app.use(express_1.default.static(path_1.default.join(__dirname, '../../dashboard/dist')));
|
|
70
70
|
app.get('/api/history', (req, res) => {
|
|
71
71
|
try {
|
|
72
72
|
const history = reasoning_1.logger.getHistory();
|
|
@@ -139,7 +139,7 @@ app.post('/api/chat', async (req, res) => {
|
|
|
139
139
|
// Fallback for React Router (Single Page Application)
|
|
140
140
|
app.use((req, res, next) => {
|
|
141
141
|
if (req.method === 'GET' && !req.path.startsWith('/api')) {
|
|
142
|
-
res.sendFile(path_1.default.join(__dirname, '
|
|
142
|
+
res.sendFile(path_1.default.join(__dirname, '../../dashboard/dist/index.html'));
|
|
143
143
|
}
|
|
144
144
|
else {
|
|
145
145
|
next();
|
package/package.json
CHANGED
package/src/gateway/server.ts
CHANGED
|
@@ -34,7 +34,7 @@ app.use(cors());
|
|
|
34
34
|
app.use(express.json());
|
|
35
35
|
|
|
36
36
|
// Serve static frontend from dashboard/dist
|
|
37
|
-
app.use(express.static(path.join(__dirname, '
|
|
37
|
+
app.use(express.static(path.join(__dirname, '../../dashboard/dist')));
|
|
38
38
|
|
|
39
39
|
app.get('/api/history', (req, res) => {
|
|
40
40
|
try {
|
|
@@ -113,7 +113,7 @@ app.post('/api/chat', async (req, res) => {
|
|
|
113
113
|
// Fallback for React Router (Single Page Application)
|
|
114
114
|
app.use((req, res, next) => {
|
|
115
115
|
if (req.method === 'GET' && !req.path.startsWith('/api')) {
|
|
116
|
-
res.sendFile(path.join(__dirname, '
|
|
116
|
+
res.sendFile(path.join(__dirname, '../../dashboard/dist/index.html'));
|
|
117
117
|
} else {
|
|
118
118
|
next();
|
|
119
119
|
}
|