Skip to content

Commit

Permalink
Allow sessions and settings location via env
Browse files Browse the repository at this point in the history
- Allow sessions path to be defined via PLN_SESSIONS_PATH
- Allow settings file be defined via PLN_SETTINGS_FILE
- Fixes #120
  • Loading branch information
exsilium committed Jul 14, 2023
1 parent be1d528 commit c6efd05
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions configs/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ var termLocal = process.env.PLN_TERMLOCAL || (host === 'localhost' || host === '

var useAuth = argv.username && argv.password;

var sessionsPath = process.env.PLN_SESSIONS_PATH || __dirname + "/../.sessions";
var settingsPath = process.env.PLN_SETTINGS_FILE || ".settings";

var config = [
{
packagePath: "./connect",
Expand Down Expand Up @@ -179,7 +182,7 @@ var config = [
},
{
packagePath: "./connect.session.file",
sessionsPath: __dirname + "/../.sessions",
sessionsPath: sessionsPath,
maxAge: 86400
},
"./pylon.permissions",
Expand Down Expand Up @@ -227,7 +230,7 @@ var config = [
"./pylon.ide.revisions",
{
packagePath: "./pylon.ide.settings",
settingsPath: ".settings"
settingsPath: settingsPath
},
"./pylon.ide.shell",
"./pylon.ide.state",
Expand Down

0 comments on commit c6efd05

Please sign in to comment.