| layout | api-command | |||
|---|---|---|---|---|
| language | JavaScript | |||
| permalink | api/javascript/server/ | |||
| command | server | |||
| io |
|
{% apibody %} conn.server(callback) conn.server() → promise {% endapibody %}
Return information about the server being used by a connection.
The server command returns either two or three fields:
id: the UUID of the server the client is connected to.proxy: a boolean indicating whether the server is a RethinkDB proxy node.name: the server name. Ifproxyistrue, this field will not be returned.
Example: Return server information.
conn.server(callback);
// Result passed to callback
{
"id": "404bef53-4b2c-433f-9184-bc3f7bda4a15",
"name": "amadeus",
"proxy": false
}If no callback is provided, a promise will be returned.