Skip to content

Commit df6d741

Browse files
committed
setup firebase
1 parent 88ad939 commit df6d741

8 files changed

+53
-2
lines changed

.env.local.example

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FIREBASE_DATABASE_EMULATOR_HOST=localhost:9000

.firebaserc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"projects": {
3+
"default": "raduwen-obs-widgets"
4+
}
5+
}

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
node_modules
22
.cache
33
.next
4+
*.log
5+
6+
.env.local

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,21 @@ raduwen-obs-widgets
22
===================
33

44
配信用Widget for オレ
5+
6+
## Instllation
7+
8+
```
9+
yarn install
10+
cp .env.local.example .env.local
11+
```
12+
13+
## Run
14+
### web
15+
```
16+
yarn dev
17+
```
18+
19+
### firebase emulator
20+
```
21+
yarn firebase:emulator:start
22+
```

database.rules.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"rules": {
3+
".read": true,
4+
".write": false,
5+
}
6+
}

firebase.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"database": {
3+
"rules": "database.rules.json"
4+
},
5+
"emulators": {
6+
"auth": {
7+
"port": 9099
8+
},
9+
"database": {
10+
"port": 9000
11+
},
12+
"ui": {
13+
"enabled": true
14+
}
15+
}
16+
}

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"scripts": {
1010
"dev": "next dev",
1111
"build": "next build",
12-
"start": "next start"
12+
"start": "next start",
13+
"firebase:emulator:start": "firebase emulators:start"
1314
},
1415
"dependencies": {
1516
"firebase": "^8.6.2",
@@ -18,6 +19,7 @@
1819
"react-dom": "^17.0.2"
1920
},
2021
"devDependencies": {
22+
"@firebase/database-types": "^0.7.2",
2123
"@types/node": "^14.17.1",
2224
"@types/react": "^17.0.2",
2325
"@types/react-dom": "^17.0.2",

yarn.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
"@firebase/util" "1.1.0"
140140
tslib "^2.1.0"
141141

142-
"@firebase/[email protected]":
142+
"@firebase/[email protected]", "@firebase/database-types@^0.7.2":
143143
version "0.7.2"
144144
resolved "https://registry.yarnpkg.com/@firebase/database-types/-/database-types-0.7.2.tgz#449c4b36ec59a1ad9089797b540e2ba1c0d4fcbf"
145145
integrity sha512-cdAd/dgwvC0r3oLEDUR+ULs1vBsEvy0b27nlzKhU6LQgm9fCDzgaH9nFGv8x+S9dly4B0egAXkONkVoWcOAisg==

0 commit comments

Comments
 (0)