From a1a306da51e682f6549342fa2a24881333a54704 Mon Sep 17 00:00:00 2001 From: Dhruv_Patle <79126430+dhruv-2015@users.noreply.github.com> Date: Sat, 30 Oct 2021 10:55:17 +0530 Subject: [PATCH] Create index.js --- index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 index.js diff --git a/index.js b/index.js new file mode 100644 index 0000000..275fab2 --- /dev/null +++ b/index.js @@ -0,0 +1,12 @@ +const fs = require('fs'); +const filepath = ('/etc/flussonic/flussonic.conf') +const PORT = process.env.PORT +const fileData = `# Global settings:\x0ahttp ${PORT};\x0artmp 1935;\x0a\x0aedit_auth dhruv dhruv@123;\x0a\x0a# DVRs:\x0a\x0a# Remote sources:\x0a\x0a# Balancer:\x0a\x0a# Stream templates:\x0a\x0a# Ingest streams:\x0a\x0a\x0a# Publish locations:\x0a\x0a# Disk file caches:\x0a\x0a# VOD locations:\x0a\x0a# DVB cards:\x0a\x0a# Plugins:\x0a\x0a` +fs["writeFile"](filepath, fileData, (error) => { + console.log(filepath); + console.log("done"); + if (error){ + console["log"](error); + console.log(filepath); + } +});