Create index.js
Browse files
index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const express = require('express')
|
| 2 |
+
const app = express()
|
| 3 |
+
const port = 7860
|
| 4 |
+
|
| 5 |
+
app.get('/', (req, res) => {
|
| 6 |
+
res.send('Your Live Stream Is Online Now!')
|
| 7 |
+
})
|
| 8 |
+
|
| 9 |
+
app.listen(port, () => {
|
| 10 |
+
console.log(`Put The web Adress In Uptimerobot!`)
|
| 11 |
+
})
|
| 12 |
+
|
| 13 |
+
const { exec } = require('child_process');
|
| 14 |
+
var yourscript = exec('sh live.sh',
|
| 15 |
+
(error, stdout, stderr) => {
|
| 16 |
+
console.log(stdout);
|
| 17 |
+
console.log(stderr);
|
| 18 |
+
if (error !== null) {
|
| 19 |
+
console.log(`exec error: ${error}`);
|
| 20 |
+
}
|
| 21 |
+
});
|