mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-21 15:12:06 +02:00
998 B
998 B
Home > bitburner > NS > getServer
NS.getServer() method
Returns data of a server.
If the server is a darknet server, it will also contain the "isOnline" field. If the darknet server has recently gone offline, the returned object will be a dummy server object with isOnline: false.
Signature:
getServer(host?: string): Server & { 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 & { isOnline?: boolean }
Data of the server.
Remarks
RAM cost: 2 GB