Fix default connection string

Fixes #38
This commit is contained in:
Drew DeVault 2018-03-08 17:19:52 -05:00
parent a730ef1acf
commit 7354ab21e9
2 changed files with 4 additions and 4 deletions

View File

@ -28,11 +28,11 @@ class ConnectionOverlay extends Component {
if (socket.state === SOCKET_STATE.DISCONNECTED) {
const uri = localStorage.getItem("autoconnect");
const password = localStorage.getItem("password");
this.state = {
uri: uri || "ws://127.0.0.1:8412",
this.setState({
uri: uri || process.env.DEFAULT_WS_URI,
password,
autoconnect: !!uri
};
});
if (uri) {
initialize(getURI(this.state.uri, this.state.password));
}

View File

@ -2,7 +2,7 @@ const path = require("path");
const webpack = require("webpack");
const defines = {
"DEFAULT_WS_URI": process.env.WEBSOCKET_URI || "ws://localhost:8412/"
"DEFAULT_WS_URI": process.env.WEBSOCKET_URI || "ws://127.0.0.1:8412/"
};
const env = process.env.ENVIRONMENT || "development";