started adding some command functionality

This commit is contained in:
Valentijn :)
2024-01-16 12:28:59 +01:00
parent eaa428518a
commit 713bb6136f
11 changed files with 711 additions and 67 deletions

View File

@@ -4,13 +4,27 @@ const port = 3000
app.use(express.static("public"))
const documentRoot = `${__dirname}/http`
const documentRoot = `${__dirname}/httpdocs`
app.get('/', (req, res) => {
res.send('Hello World!')
res.sendFile(documentRoot+"/index.html")
})
app.get("/execute", (req, res)=> {
const raw_command = req.body.command;
const formatted_command = toString(raw_command).trim()
if (formatted_command.startsWith("ls")){
}
})
app.listen(port, () => {
console.log(`Example app listening on port ${port}`)
})
})
function LS () {
}