Skip to content

Commit

Permalink
Firebase hosting
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkbyu committed Dec 19, 2018
1 parent 680730d commit 0e21edc
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 2 deletions.
1 change: 1 addition & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
6 changes: 6 additions & 0 deletions database.rules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"rules": {
".read": "auth != null",
".write": "auth != null"
}
}
19 changes: 19 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"database": {
"rules": "database.rules.json"
},
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
19 changes: 17 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,23 @@
<link rel="icon" href="img/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link rel="stylesheet" href="stylesheets/style.css">

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
<script src="https://www.gstatic.com/firebasejs/5.7.0/firebase.js"></script>
<script>
// Initialize Firebase
var config = {
apiKey: "AIzaSyBoGcbew0KC_3vvAZCUQK9ckgMrPW6pTmg",
authDomain: "spot-the-puppy.firebaseapp.com",
databaseURL: "https://spot-the-puppy.firebaseio.com",
projectId: "spot-the-puppy",
storageBucket: "",
messagingSenderId: "351647460507"
};
firebase.initializeApp(config);
</script>
<!-- AngularJS -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.min.js"></script>
<!-- AngularFire -->
<script src="https://cdn.firebase.com/libs/angularfire/2.3.0/angularfire.min.js"></script>
</head>

<body ng-app='app' ng-controller='mainCtrl'>
Expand Down

0 comments on commit 0e21edc

Please sign in to comment.