import { BespokeServer } from "../lib/server/bespoke-server" ; import * as program from "commander" ; program . command ( "start <webhookPort> <nodePorts ...>" ) . description ( "Starts the BST server" ) . action ( function ( ) { const webhookPort = parseInt ( process . argv [ 3 ] ) ; const serverPorts = [ ] ; for ( let i = 4 ; i < process . argv . length ; i ++ ) { serverPorts . push ( parseInt ( process . argv [ i ] ) ) ; } const bespokeServer = new BespokeServer ( webhookPort , serverPorts ) ; bespokeServer . start ( ) ; } ) ; program . parse ( process . argv ) ;