UNPKG

deth

Version:

Ethereum node focused on Developer Experience

25 lines (24 loc) 684 B
#!/usr/bin/env node "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const node_1 = require("./node"); const Path_1 = require("../fs/Path"); const PORT = 8545; const args = process.argv.slice(2); const configPath = getConfigPathFromArgs(args); node_1.runNode(PORT, configPath) .then(app => { app.on('listening', () => { console.log(`🚀 Deth node listening on port: ${PORT}`); }); }) .catch(e => { console.error('Init error', e); }); function getConfigPathFromArgs(args) { const configPath = args[0]; if (!configPath) { return undefined; } return Path_1.relativePathToPath(configPath, process.cwd()); }