hostname - Node documentation
function hostname

Usage

import { hostname } from "node:os";

Returns the host name of the operating system as a string.

Return Type

string