Skip to content

Commit 62a410a

Browse files
committed
Fix nits
1 parent c39183d commit 62a410a

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const ruleConfig = {
3939
fix: '/esm$A'
4040
};
4141

42-
export const handleEsm = async (req, res) => {
42+
export async function handleESM(req, res) {
4343
try {
4444
const targetPath = req.url.replace(/^\/esm/u, '');
4545
const upstreamUrl = `http://esm:8080${targetPath}`;
@@ -65,6 +65,6 @@ export const handleEsm = async (req, res) => {
6565
} catch (err) {
6666
console.error('ESM proxy error:', err.stack);
6767
res.writeHead(500);
68-
return res.end("An internal server error occurred");
68+
return res.end('An internal server error occurred');
6969
}
70-
};
70+
}

packages/test/web-server/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { createServer as createSecureServer } from 'node:https';
55
import selfsigned from 'selfsigned';
66
import handleServe from 'serve-handler';
77

8-
import { handleEsm } from './handleEsm';
8+
import { handleESM } from './handleESM';
99

1010
const {
1111
// eslint-disable-next-line no-magic-numbers
@@ -19,7 +19,7 @@ const {
1919

2020
const handler = (req, res) => {
2121
if (req.url.startsWith('/esm/')) {
22-
return handleEsm(req, res);
22+
return handleESM(req, res);
2323
}
2424

2525
return handleServe(req, res, config);

0 commit comments

Comments
 (0)