Get config from config path.
This commit is contained in:
2
index.js
2
index.js
@@ -39,7 +39,7 @@ function getConfigPath() {
|
|||||||
const configPath = getConfigPath();
|
const configPath = getConfigPath();
|
||||||
if (fs.existsSync(configPath)) {
|
if (fs.existsSync(configPath)) {
|
||||||
console.log(`Found config at ${configPath}`);
|
console.log(`Found config at ${configPath}`);
|
||||||
const config = ini.parse(fs.readFileSync('./config.ini', 'utf-8'));
|
const config = ini.parse(fs.readFileSync(configPath, 'utf-8'));
|
||||||
// get users nostr private hex
|
// get users nostr private hex
|
||||||
let sk = config.nostr.pkhex;
|
let sk = config.nostr.pkhex;
|
||||||
// calculate pubkey from private
|
// calculate pubkey from private
|
||||||
|
Reference in New Issue
Block a user