mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
1002 B
1002 B
Home > bitburner > NS > getServer
NS.getServer() method
Returns data of a server.
If the server is a darknet server and has recently gone offline, it will return a dummy server object with isOnline: false.
Signature:
getServer(host?: string): Server | (DarknetServerData & { isOnline: boolean });
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
host |
string |
(Optional) Optional. Hostname/IP of the server. Defaults to the hostname of the running script's server. |
Returns:
Server | (DarknetServerData & { isOnline: boolean })
Data of the server.
Remarks
RAM cost: 2 GB