Skip to content
This repository has been archived by the owner on Jul 31, 2018. It is now read-only.

add env config #55

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions client/config/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

const config = {
development: {
base: '/'
},

production: {
base: '/'
}
}

export default config[process.env.NODE_ENV || 'development']
3 changes: 2 additions & 1 deletion client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ import React from 'react'

import App from './containers/App'
import configure from './store'
import config from './config'

const store = configure()

ReactDOM.render(
<Provider store={store}>
<Router history={browserHistory}>
<Route path="/" component={App}>
<Route path={config.base} component={App}>
</Route>
</Router>
</Provider>,
Expand Down