# Firebase Adapter

Qwik Router Firebase Adapter allows you to connect Qwik Router to [Firebase](https://firebase.google.com/docs/hosting).

## Installation

To integrate the `firebase` adapter, use the `add` command:

```shell
pnpm run qwik add firebase
```

The adapter will add a new `vite.config.ts` within the `adapters/` directory, and a new entry file will be created, such as:

```shell
`-- adapters/
    `-- firebase
        `-- vite.config.ts
`-- src/
    `-- entry-firebase.tsx
```

Additionally, within the `package.json`, the `build.server` and `serve` scripts will be updated.

## Production build

To build the application for production, use the `build` command, this command will automatically run `build.server` and `build.client`:

```shell
pnpm run build
```

## Deploy to Firebase

Before deploy you need to setup your Firebase Credentials and add a Firebase project to the repository using these commands.

```shell
firebase login
firebase use --add
pnpm run deploy
```

Done!
