Spaces:
Running
Running
Update app.js
Browse files
app.js
CHANGED
|
@@ -42,6 +42,17 @@ try {
|
|
| 42 |
const app = express();
|
| 43 |
const PORT = process.env.PORT || 7860;
|
| 44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
// Load prompts safely
|
| 46 |
let sysPrompts = {};
|
| 47 |
try {
|
|
|
|
| 42 |
const app = express();
|
| 43 |
const PORT = process.env.PORT || 7860;
|
| 44 |
|
| 45 |
+
// ---
|
| 46 |
+
app.use((req, res, next) => {
|
| 47 |
+
console.log('[REQ]', req.method, req.originalUrl);
|
| 48 |
+
console.log('[HEADERS]', req.headers);
|
| 49 |
+
console.log('[BODY]', req.body ?? '(unparseable or empty)');
|
| 50 |
+
next();
|
| 51 |
+
});
|
| 52 |
+
|
| 53 |
+
// ---
|
| 54 |
+
|
| 55 |
+
|
| 56 |
// Load prompts safely
|
| 57 |
let sysPrompts = {};
|
| 58 |
try {
|