Home > @firebase/database > useDatabaseEmulator
useDatabaseEmulator() function
Modify the provided instance to communicate with the Realtime Database emulator.
Note: This method must be called before performing any other operation.
Signature:
export declare function useDatabaseEmulator(db: FirebaseDatabase, host: string, port: number): void;
Parameters
Parameter | Type | Description |
---|---|---|
db | FirebaseDatabase | The instance to modify. |
host | string | The emulator host (ex: localhost) |
port | number | The emulator port (ex: 8080) |
Returns:
void