2024-01-01 21:11:32 +00:00
|
|
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2023-12-04 04:50:40 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Network utilities.
|
|
|
|
*
|
2024-06-07 03:54:15 +00:00
|
|
|
* ```ts no-assert no-eval
|
|
|
|
* import { getNetworkAddress, getAvailablePort } from "@std/net";
|
|
|
|
*
|
|
|
|
* console.log(`My network IP address is ${getNetworkAddress()}`);
|
|
|
|
*
|
|
|
|
* Deno.serve({ port: getAvailablePort() }, () => new Response("Hello, world!"));
|
|
|
|
* ```
|
|
|
|
*
|
2023-12-04 04:50:40 +00:00
|
|
|
* @module
|
|
|
|
*/
|
|
|
|
|
|
|
|
export * from "./get_available_port.ts";
|
2024-05-30 02:17:40 +00:00
|
|
|
export * from "./get_network_address.ts";
|