Commit 4eade86d authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent acab24b3
...@@ -21,6 +21,12 @@ app.get('/ip/:ip/', (req, res) => { ...@@ -21,6 +21,12 @@ app.get('/ip/:ip/', (req, res) => {
}) })
app.get('/rst2', (req, res) => {
return reboot()
})
app.get('/test', (req, res) => { app.get('/test', (req, res) => {
// console.log(req.params.acc) // console.log(req.params.acc)
res.sendfile('jetmtp.png') res.sendfile('jetmtp.png')
...@@ -38,6 +44,12 @@ async function addBaship(ip) { ...@@ -38,6 +44,12 @@ async function addBaship(ip) {
} }
async function reboot() {
return await shell.exec(' reboot ').stderr;
}
app.listen(port, () => console.log(`Example app listening on port ${port}!`)) app.listen(port, () => console.log(`Example app listening on port ${port}!`))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment