Skip to content

Commit

Permalink
Update start.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ironoa authored Mar 14, 2023
1 parent 012383e commit 941b87e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/actions/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ const _loadConfig = async (config: any): Promise<InputConfig> =>{
export async function startAction(cmd): Promise<void> {
const cfg = await _loadConfig(cmd.config)

const logger = LoggerSingleton.getInstance(cfg.logLevel)
logger.info(`loaded ${cfg.targets.length} accounts`)

const server = express();
server.get('/healthcheck',
async (req: express.Request, res: express.Response): Promise<void> => {
Expand All @@ -46,8 +49,6 @@ export async function startAction(cmd): Promise<void> {
res.end(await register.metrics())
})
server.listen(cfg.port);

LoggerSingleton.setInstance(cfg.logLevel)

const api = await new Client(cfg).connect()
const chain = await api.rpc.system.chain()
Expand Down

0 comments on commit 941b87e

Please sign in to comment.