This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { BrowserModule } from '@angular/platform-browser'; | |
| import { NgModule } from '@angular/core'; | |
| import { AngularFireModule } from 'angularfire2'; | |
| import { AngularFireDatabaseModule } from 'angularfire2/database'; | |
| import { AngularFireAuthModule } from 'angularfire2/auth'; | |
| import { environment } from 'environments/environment'; | |
| import { AppComponent } from './app.component'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const environment = { | |
| production: false, | |
| firebaseConfig: { | |
| apiKey: "AIzaSyBjsEXmLI-4kOcz793QZh9ElN_iSHlO74M", | |
| authDomain: "ng-firebase-dev.firebaseapp.com", | |
| databaseURL: "https://ng-firebase-dev.firebaseio.com", | |
| projectId: "ng-firebase-dev", | |
| storageBucket: "ng-firebase-dev.appspot.com", | |
| messagingSenderId: "644800494252" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component } from '@angular/core'; | |
| import { AngularFireDatabase, AngularFireList } from 'angularfire2/database'; | |
| import { Observable } from 'rxjs/Observable'; | |
| @Component({ | |
| selector: 'app-root', | |
| templateUrl: './app.component.html', | |
| styleUrls: ['./app.component.css'] | |
| }) | |
| export class AppComponent { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ul> | |
| <li *ngFor="let item of items | async"> | |
| <input type="text" #updatetext [value]="item.text" /> | |
| <button (click)="updateItem(item.key, updatetext.value)">Update</button> | |
| <button (click)="deleteItem(item.key)">Delete</button> | |
| </li> | |
| </ul> | |
| <input type="text" #newitem /> | |
| <button (click)="addItem(newitem.value)">Add</button> | |
| <button (click)="deleteEverything()">Delete All</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "database": { | |
| "rules": { | |
| ".read": "true", | |
| ".write": "true" | |
| } | |
| }, | |
| "hosting": { | |
| "public": "dist", | |
| "rewrites": [{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "projects": { | |
| "default": "ng-firebase-dev", | |
| "develop": "ng-firebase-dev", | |
| "production": "ng-firebase-241bb" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "scripts": { | |
| "ng": "ng", | |
| "start": "ng serve", | |
| "build": "ng build", | |
| "test": "ng test", | |
| "lint": "ng lint", | |
| "e2e": "ng e2e", | |
| "predeploy": "firebase use --token $FIREBASE_DEPLOY_KEY $CI_ENVIRONMENT_SLUG", | |
| "deploy": "firebase deploy --non-interactive --token $FIREBASE_DEPLOY_KEY" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .node: &node | |
| image: node:7 | |
| before_script: | |
| - npm install | |
| cache: | |
| key: "$CI_COMMIT_REF_NAME" | |
| paths: | |
| - node_modules/ | |
| stages: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const admin = require('./node_modules/firebase-admin'); | |
| const serviceAccount = require("./service-key.json"); | |
| const data = require("./data.json"); | |
| admin.initializeApp({ | |
| credential: admin.credential.cert(serviceAccount), | |
| databaseURL: "https://YOUR_DB.firebaseio.com" | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Web components loader</title> | |
| <link rel="import" href="./apps/angular-app.html"> | |
| <link rel="import" href="./apps/react-app.html"> | |
| </head> | |
| <body> | |
| <h1>Hello web-components</h1> |