voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
29 lines (17 loc) • 825 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/database](./database.md) > [useDatabaseEmulator](./database.usedatabaseemulator.md)
## useDatabaseEmulator() function
Modify the provided instance to communicate with the Realtime Database emulator.
<p>Note: This method must be called before performing any other operation.
<b>Signature:</b>
```typescript
export declare function useDatabaseEmulator(db: FirebaseDatabase, host: string, port: number): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| db | [FirebaseDatabase](./database.firebasedatabase.md) | The instance to modify. |
| host | string | The emulator host (ex: localhost) |
| port | number | The emulator port (ex: 8080) |
<b>Returns:</b>
void