Init Firebase config

This commit is contained in:
Mathieu Sanchez 2019-05-21 11:20:43 +09:00
parent 5f0b10eed7
commit fb83703c54
4 changed files with 32 additions and 6 deletions

View File

@ -4,15 +4,22 @@ import { NgModule } from '@angular/core';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { AngularFireModule } from '@angular/fire';
import { AngularFireDatabaseModule } from '@angular/fire/database';
import { environment } from '@env/environment';
@NgModule({ @NgModule({
declarations: [ declarations: [
AppComponent AppComponent
], ],
imports: [ imports: [
BrowserModule, BrowserModule,
BrowserAnimationsModule BrowserAnimationsModule,
AngularFireModule.initializeApp(environment.firebaseConfig),
AngularFireDatabaseModule,
], ],
providers: [], providers: [],
bootstrap: [ AppComponent ] bootstrap: [ AppComponent ]
}) })
export class AppModule { } export class AppModule {
}

View File

@ -1,3 +1,12 @@
export const environment = { export const environment = {
production: true production: true,
firebaseConfig: {
apiKey: 'AIzaSyDe48emSyoXS3WV6vM4GjYiJwdcMhcspqY',
authDomain: 'disco-trip.firebaseapp.com',
databaseURL: 'https://disco-trip.firebaseio.com',
projectId: 'disco-trip',
storageBucket: 'disco-trip.appspot.com',
messagingSenderId: '113728943338',
appId: '1:113728943338:web:366dabcdff057858'
},
}; };

View File

@ -3,7 +3,16 @@
// The list of file replacements can be found in `angular.json`. // The list of file replacements can be found in `angular.json`.
export const environment = { export const environment = {
production: false production: false,
firebaseConfig: {
apiKey: 'AIzaSyDe48emSyoXS3WV6vM4GjYiJwdcMhcspqY',
authDomain: 'disco-trip.firebaseapp.com',
databaseURL: 'https://disco-trip.firebaseio.com',
projectId: 'disco-trip',
storageBucket: 'disco-trip.appspot.com',
messagingSenderId: '113728943338',
appId: '1:113728943338:web:366dabcdff057858'
},
}; };
/* /*

View File

@ -1,7 +1,7 @@
{ {
"compileOnSave": false, "compileOnSave": false,
"compilerOptions": { "compilerOptions": {
"baseUrl": "./", "baseUrl": "src",
"outDir": "./dist/out-tsc", "outDir": "./dist/out-tsc",
"sourceMap": true, "sourceMap": true,
"declaration": false, "declaration": false,
@ -11,6 +11,7 @@
"experimentalDecorators": true, "experimentalDecorators": true,
"importHelpers": true, "importHelpers": true,
"target": "es5", "target": "es5",
"resolveJsonModule": true,
"paths": { "paths": {
"@app/*": [ "@app/*": [
"app/*" "app/*"