Skip to content

Commit

Permalink
Fix bin program https key file path error
Browse files Browse the repository at this point in the history
  • Loading branch information
illuspas committed Dec 3, 2024
1 parent bbd5bc6 commit 4e854db
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
14 changes: 13 additions & 1 deletion bin/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
const NodeMediaServer = require("..");
#!/usr/bin/env node

const fs = require("fs");
const path = require("path");
const config = require("./config.json");
const NodeMediaServer = require("..");

if (!fs.existsSync(config.https.key)) {
config.https.key = path.join(__dirname, config.https.key);

}
if (!fs.existsSync(config.https.cert)) {
config.https.cert = path.join(__dirname, config.https.cert);
}

const nms = new NodeMediaServer(config);
nms.run();
4 changes: 2 additions & 2 deletions bin/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"https": {
"bind": "0.0.0.0",
"port": 8443,
"key": "./bin/key.pem",
"cert": "./bin/cert.pem"
"key": "./key.pem",
"cert": "./cert.pem"
}
}

0 comments on commit 4e854db

Please sign in to comment.