Skip to content

Commit

Permalink
path: make notedeck install md path configurable
Browse files Browse the repository at this point in the history
Important for deploys
  • Loading branch information
jb55 committed Nov 30, 2024
1 parent 92a888f commit 4d6add6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The Damus API backend for Damus Purple and other functionality.

- `DB_PATH`: Path to the folder where to save mdb files.
- `TESTFLIGHT_URL`: URL for the TestFlight app (optional)
- `NOTEDECK_INSTALL_MD`: URL for the notedeck installation instructions markdown

#### Translations

Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const debug = require('debug')('api')
const { PurpleInvoiceManager } = require('./invoicing')
const { WebAuthManager } = require('./web_auth')

const ENV_VARS = ["LN_NODE_ID", "LN_NODE_ADDRESS", "LN_RUNE", "LN_WS_PROXY", "DEEPL_KEY", "DB_PATH"]
const ENV_VARS = ["LN_NODE_ID", "LN_NODE_ADDRESS", "LN_RUNE", "LN_WS_PROXY", "DEEPL_KEY", "DB_PATH", "NOTEDECK_INSTALL_MD"]

function check_env() {
const missing = []
Expand Down
2 changes: 1 addition & 1 deletion src/router_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ function config_router(app) {
}
const account_info = get_account_info_payload(user_id, account, true)
if(account_info.active == true) {
const installInstructionsPath = path.resolve('notedeck-install-instructions.md');
const installInstructionsPath = path.resolve(process.env.NOTEDECK_INSTALL_MD);
try {
const installInstructions = fs.readFileSync(installInstructionsPath, { encoding: 'utf8' });
json_response(res, { value: installInstructions });
Expand Down

0 comments on commit 4d6add6

Please sign in to comment.