Tests. Autocomplete. Few Fixes. Mocks for Electrum Service. Template-to-Json parser. Fix global paths. Use IO Dependency injection for logging from cli. Additional commands in CLI.
This commit is contained in:
10
src/index.ts
10
src/index.ts
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* XO Wallet CLI - Terminal User Interface for XO crypto wallet.
|
||||
*
|
||||
@@ -9,18 +10,25 @@
|
||||
* 5. Real-time updates via SSE
|
||||
*/
|
||||
|
||||
import { join } from "node:path";
|
||||
|
||||
import { App } from "./app.js";
|
||||
import { getDataDir } from "./utils/paths.js";
|
||||
|
||||
/**
|
||||
* Main entry point.
|
||||
*/
|
||||
async function main(): Promise<void> {
|
||||
try {
|
||||
const dataDir = getDataDir();
|
||||
// Create and start the application
|
||||
await App.create({
|
||||
syncServerUrl: process.env["SYNC_SERVER_URL"] ?? "http://localhost:3000",
|
||||
databasePath: process.env["DB_PATH"] ?? "./",
|
||||
databasePath: process.env["DB_PATH"] ?? dataDir,
|
||||
databaseFilename: process.env["DB_FILENAME"] ?? "xo-wallet.db",
|
||||
invitationStoragePath:
|
||||
process.env["INVITATION_STORAGE_PATH"] ??
|
||||
join(dataDir, "xo-invitations.db"),
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("Failed to start XO Wallet CLI:", error);
|
||||
|
||||
Reference in New Issue
Block a user