mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 20:25:45 +01:00
31 lines
682 B
Markdown
31 lines
682 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [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.
|
|
|
|
**Signature:**
|
|
|
|
```typescript
|
|
getServer(host?: string): Server;
|
|
```
|
|
|
|
## Parameters
|
|
|
|
| Parameter | Type | Description |
|
|
| --- | --- | --- |
|
|
| host | string | _(Optional)_ Optional. Hostname for the requested server object. |
|
|
|
|
**Returns:**
|
|
|
|
[Server](./bitburner.server.md)
|
|
|
|
The requested server object.
|
|
|
|
## Remarks
|
|
|
|
RAM cost: 2 GB
|
|
|