From 25aeefa9d1802f4e07649b8177ecf3b2b45e9a61 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Tue, 24 Mar 2026 23:05:33 +0000 Subject: [PATCH] server started --- server.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 server.js diff --git a/server.js b/server.js new file mode 100644 index 0000000..959d558 --- /dev/null +++ b/server.js @@ -0,0 +1,18 @@ +const express = require('express'); +const { execSync } = require('child_process'); + +const app = express() +app.use(express.json()) + +app.post('/test', (req, res)=>{ + + const resumeFlag = `` + const result = execSync( + `cd /home/matt/pathfinder && claude -p "${req.body.message}" ${resumeFlag} --output-format json --allowedTools "Bash(*)" "Read(*)" "Write(*)" "Edit(*)"`, + { encoding: 'utf-8', timeout: 120000 } + ); + res.json(JSON.parse(result)) + +}) + +app.listen(3000);