mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 07:04:52 +09:00
Replace hardcoded paths with paths from the config
This commit is contained in:
1 parent
e4386d57e8
commit
c645fac3de
1 file changed
+3
-3
@@ -992,7 +992,7 @@ async function startServer() {
|
|||||||
expiresIn: 86400*365 // expires in 1 year
|
expiresIn: 86400*365 // expires in 1 year
|
||||||
}));
|
}));
|
||||||
setInterval(()=>{
|
setInterval(()=>{
|
||||||
fs.writeFileSync("database/items.json", JSON.stringify(db.items));
|
fs.writeFileSync(path.resolve(config.databaseDirectory, "items.json"), JSON.stringify(db.items));
|
||||||
},config.autosaveInterval || 60000);
|
},config.autosaveInterval || 60000);
|
||||||
process.on('SIGINT', shutdown); // ctrl + c
|
process.on('SIGINT', shutdown); // ctrl + c
|
||||||
process.on('SIGHUP', shutdown); // terminal closed
|
process.on('SIGHUP', shutdown); // terminal closed
|
||||||
@@ -1016,8 +1016,8 @@ async function startServer() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (httpsPort) {
|
if (httpsPort) {
|
||||||
var certificate = fs.readFileSync(path.resolve(config.databaseDirectory, 'certificates/cert.crt'));
|
var certificate = fs.readFileSync(config.sslCert);
|
||||||
var privateKey = fs.readFileSync(path.resolve(config.databaseDirectory, 'certificates/cert.key'));
|
var privateKey = fs.readFileSync(config.sslPrivKey);
|
||||||
|
|
||||||
let httpsServer = require("https").createServer({
|
let httpsServer = require("https").createServer({
|
||||||
key: privateKey,
|
key: privateKey,
|
||||||
|
|||||||
Reference in new issue
Block a user