Skip to content

Commit b035290

Browse files
authored
learn: fix net module import in server and client example (#7975)
1 parent 8d8aeae commit b035290

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/site/pages/en/learn/modules/how-to-use-streams.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ server.listen(8080, () => {
302302
```
303303

304304
```mjs
305-
import { net } from 'node:net';
305+
import net from 'node:net';
306306

307307
// Create a TCP server
308308
const server = net.createServer(socket => {
@@ -345,7 +345,7 @@ client.on('end', () => {
345345
```
346346

347347
```mjs
348-
import { net } from 'node:net';
348+
import net from 'node:net';
349349

350350
// Connect to the server at localhost:8080
351351
const client = net.createConnection({ port: 8080 }, () => {

0 commit comments

Comments
 (0)