Home > bitburner > NS > getServer
Returns a server object for the given server. Defaults to the running script's server if host is not specified.
Signature:
getServer(host?: string): Server;
Parameter | Type | Description |
---|---|---|
host | string | Optional. Hostname for the requested server object. |
Returns:
The requested server object.
RAM cost: 2 GB