-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
executable file
·54 lines (47 loc) · 1.63 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import React from "react";
import "bootstrap/dist/css/bootstrap.css";
import "bootstrap/dist/css/bootstrap-theme.css";
import "./assets/scss/index.css";
import ReactDOM from "react-dom";
import { Provider } from "react-redux";
import { BrowserRouter } from "react-router-dom";
import registerServiceWorker from "./registerServiceWorker";
import createBrowserHistory from "history/createBrowserHistory";
import configureStore from "./store/configureStore";
import App from "./app/App";
import ENV from "./AppConstants.jsx";
import * as firebase from "firebase";
// adding rx operators
// var config = {
// apiKey: "AIzaSyCeSSfTO7a3moD2_qfStsiYZk36TQBe1zw",
// authDomain: "eco-earth-b0911.firebaseapp.com",
// databaseURL: "https://eco-earth-b0911.firebaseio.com",
// projectId: "eco-earth-b0911",
// storageBucket: "eco-earth-b0911.appspot.com",
// messagingSenderId: "1043499852389"
// };
// firebase.initializeApp(config);
// export const database = firebase.database;
const store = configureStore();
export const history = createBrowserHistory();
var config = {
apiKey: ENV.FIREBASE.APP_KEY,
authDomain: ENV.FIREBASE.AUTH_DOMAIN,
databaseURL: ENV.FIREBASE.DATABASE_URL,
projectId: ENV.FIREBASE.PROJECT_ID,
storageBucket: ENV.FIREBASE.STORAGE_BUCKET,
messagingSenderId: ENV.FIREBASE.MESSAGING_SENDERID
};
firebase.initializeApp(config);
const database = firebase.database();
//const firebaseAuth = firebase.auth();
export default database;
ReactDOM.render(
<Provider store={store}>
<BrowserRouter history={history}>
<App />
</BrowserRouter>
</Provider>,
document.getElementById("root")
);
registerServiceWorker();