diff --git a/packages/generators/src/app/templates/app.tpl.ts b/packages/generators/src/app/templates/app.tpl.ts index 2e99d0849b..e723866f23 100644 --- a/packages/generators/src/app/templates/app.tpl.ts +++ b/packages/generators/src/app/templates/app.tpl.ts @@ -43,7 +43,7 @@ ${ : '' } app.configure(services) -app.configure(channels) +${transports.includes('websockets') ? 'app.configure(channels)' : ''} // Register hooks that run on all service methods @@ -105,7 +105,7 @@ ${ : '' } app.configure(services) -app.configure(channels) +${transports.includes('websockets') ? 'app.configure(channels)' : ''} // Configure a middleware for 404s and the error handler app.use(notFound())