parent
593ddb6a6c
commit
25aeefa9d1
@ -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);
|
||||
Loading…
Reference in new issue