托管在FireBase上反应Web应用程序

时间:2018-06-12 07:32:27

标签: reactjs firebase deployment firebase-hosting

我已经构建了一个reactJs网络应用程序,我正在尝试将其部署在fire base上。 我在firebase创建的index.js文件夹中的Public文件中执行了所有步骤,并获得了404页面。我该怎么办 ?谢谢!

src / index.js:

import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import ReduxPromise from 'redux-promise';
import firebase from 'firebase'


import App from './components/app';
import reducers from './reducers';

const createStoreWithMiddleware = applyMiddleware(ReduxPromise)(createStore);

var config = {
  apiKey: "XXXXXX",
  authDomain: "forecast-34204.firebaseapp.com",
  databaseURL: "https://forecast-34204.firebaseio.com",
  projectId: "forecast-34204",
  storageBucket: "forecast-34204.appspot.com",
  messagingSenderId: "352834183798"
};

firebase.initializeApp(config);

ReactDOM.render(
  <Provider store={createStoreWithMiddleware(reducers)}>
    <App />
  </Provider>
  , document.querySelector('.container'));

文件:

Files

0 个答案:

没有答案