bitburner-src/markdown/bitburner.ns.getserver.md

31 lines
675 B
Markdown
Raw Normal View History

2021-10-30 18:34:14 +02:00
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [NS](./bitburner.ns.md) &gt; [getServer](./bitburner.ns.getserver.md)
## NS.getServer() method
Returns a server object for the given server. Defaults to the running script's server if host is not specified.
<b>Signature:</b>
```typescript
2021-10-30 21:46:34 +02:00
getServer(host?: string): Server;
2021-10-30 18:34:14 +02:00
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
2021-10-30 21:46:34 +02:00
| host | string | Optional. Hostname for the requested server object. |
2021-10-30 18:34:14 +02:00
<b>Returns:</b>
[Server](./bitburner.server.md)
The requested server object.
## Remarks
2021-10-30 21:46:34 +02:00
RAM cost: 2 GB
2021-10-30 18:34:14 +02:00