Skip to content

Commit 24c96de

Browse files
bram-atmireclaude
andcommitted
Fix ESLint errors in main.server.ts
- Change from namespace import to named import (import/no-namespace) - Move DNS configuration after all imports (import/first) - Fix import ordering (simple-import-sort/imports) All linting errors resolved. No functional changes to the DNS fix. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 5e7a2de commit 24c96de

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main.server.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
* the backend only listens on IPv4.
55
* See: https://github.com/nodejs/node/issues/40537
66
*/
7-
import * as dns from 'node:dns';
8-
dns.setDefaultResultOrder('ipv4first');
9-
107
import 'core-js/es/reflect';
118
import 'zone.js';
129
import 'reflect-metadata';
@@ -16,6 +13,8 @@ import 'reflect-metadata';
1613
*/
1714
import '@angular/localize/init';
1815

16+
import { setDefaultResultOrder } from 'node:dns';
17+
1918
import {
2019
bootstrapApplication,
2120
BootstrapContext,
@@ -24,6 +23,9 @@ import {
2423
import { AppComponent } from './app/app.component';
2524
import { serverAppConfig } from './modules/app/server-app.config';
2625

26+
// Apply DNS resolution order fix for Node.js 17+
27+
setDefaultResultOrder('ipv4first');
28+
2729
const bootstrap = (context: BootstrapContext) => bootstrapApplication(AppComponent, serverAppConfig, context);
2830

2931
export default bootstrap;

0 commit comments

Comments
 (0)