started adding some command functionality
This commit is contained in:
20
server.js
20
server.js
@@ -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 () {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user