Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
filvecchiato committed Aug 15, 2024
1 parent 7aab009 commit 8e4bf57
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ async function main() {
startUpPrompt(config.SUBSTRATE.URL, chainName.toString(), implName.toString());

const preMiddlewares = [json(), middleware.httpLoggerCreate(logger)];
let metrics = {};
if (args.prometheus) {
// Create Metrics App
const metricsApp = new MetricsApp({
Expand All @@ -76,15 +75,14 @@ async function main() {

// Generate metrics middleware
preMiddlewares.push(metricsApp.preMiddleware());
metrics = metricsApp.getRegisteredMetrics();
// Start the Metrics server
metricsApp.listen();
}

// Create our App
const app = new App({
preMiddleware: preMiddlewares,
controllers: getControllersForSpec(api, specName.toString(), metrics),
controllers: getControllersForSpec(api, specName.toString()),
postMiddleware: [
middleware.txError,
middleware.httpError,
Expand Down

0 comments on commit 8e4bf57

Please sign in to comment.