https://github.com/adrianmcli/firebase-nextjs-example
An example app for using firebase with Next.js
https://github.com/adrianmcli/firebase-nextjs-example
Last synced: 7 months ago
JSON representation
An example app for using firebase with Next.js
- Host: GitHub
- URL: https://github.com/adrianmcli/firebase-nextjs-example
- Owner: adrianmcli
- Created: 2017-09-07T21:05:05.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-08T01:12:26.000Z (over 8 years ago)
- Last Synced: 2025-01-03T14:49:39.065Z (over 1 year ago)
- Language: JavaScript
- Size: 63.5 KB
- Stars: 19
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Firebase Next.js Example
A simple example of how to connect to a Firebase database and retrieve data.
### Installation
1. Install Node dependencies:
```bash
# with NPM
npm install
# with Yarn
yarn
```
2. Create a `.env` file and a `.env.production` file in the project root with the following structure:
```
FIREBASE_API_KEY=ASndKBULjahs57AdnaiAasd2asKD234HBJKHasd
FIREBASE_AUTH_DOMAIN=my-app.firebaseapp.com
FIREBASE_DATABASE_URL=https://my-app.firebaseio.com
FIREBASE_PROJECT_ID=my-app
FIREBASE_STORAGE_BUCKET=my-app.appspot.com
FIREBASE_SENDER_ID=987678767878
```
3. Run the app:
```bash
# with NPM
npm run dev
# with Yarn
yarn dev
```