Add port arg to ubuntu-server.js
Use the value of REACT_SERVER_PORT env var if set Change node port and datadir depending on the value of DEV_BUILD config variable Fix missing paren Bugfix Remove desktopJSBundlePath Signed-off-by: Vitaliy Vlasov <siphiuel@gmail.com>
This commit is contained in:
parent
d32f15243d
commit
a0f707fee2
1
.env
1
.env
|
@ -17,3 +17,4 @@ CACHED_WEBVIEWS_ENABLED=1
|
||||||
EXTENSIONS=1
|
EXTENSIONS=1
|
||||||
HARDWALLET_ENABLED=0
|
HARDWALLET_ENABLED=0
|
||||||
PFS_ENCRYPTION_ENABLED=0
|
PFS_ENCRYPTION_ENABLED=0
|
||||||
|
DEV_BUILD=1
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
"re-natal": "git+https://github.com/status-im/re-natal.git#master",
|
"re-natal": "git+https://github.com/status-im/re-natal.git#master",
|
||||||
"react": "16.4.1",
|
"react": "16.4.1",
|
||||||
"react-dom": "16.4.2",
|
"react-dom": "16.4.2",
|
||||||
"react-native": "git+https://github.com/status-im/react-native-desktop.git#fix/text-input-default-value",
|
"react-native": "git+https://github.com/status-im/react-native-desktop.git#master",
|
||||||
"react-native-background-timer": "2.0.0",
|
"react-native-background-timer": "2.0.0",
|
||||||
"react-native-camera": "0.10.0",
|
"react-native-camera": "0.10.0",
|
||||||
"react-native-config": "git+https://github.com/status-im/react-native-config.git",
|
"react-native-config": "git+https://github.com/status-im/react-native-config.git",
|
||||||
|
|
|
@ -53,9 +53,12 @@
|
||||||
(get-in db [:accounts/accounts address :network]))
|
(get-in db [:accounts/accounts address :network]))
|
||||||
|
|
||||||
(defn- get-base-node-config [config]
|
(defn- get-base-node-config [config]
|
||||||
(assoc config
|
(cond-> (assoc config
|
||||||
:BackupDisabledDataDir (utils.platform/no-backup-directory)
|
:Name "StatusIM"
|
||||||
:Name "StatusIM"))
|
:BackupDisabledDataDir (utils.platform/no-backup-directory))
|
||||||
|
config/dev-build?
|
||||||
|
(assoc :ListenAddr ":30304"
|
||||||
|
:DataDir (str (:DataDir config) "_dev"))))
|
||||||
|
|
||||||
(defn- pick-nodes
|
(defn- pick-nodes
|
||||||
"Picks `limit` different nodes randomly from the list of nodes
|
"Picks `limit` different nodes randomly from the list of nodes
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
(def rn-bridge-threshold-warnings-enabled? (enabled? (get-config :RN_BRIDGE_THRESHOLD_WARNINGS 0)))
|
(def rn-bridge-threshold-warnings-enabled? (enabled? (get-config :RN_BRIDGE_THRESHOLD_WARNINGS 0)))
|
||||||
(def extensions-enabled? (enabled? (get-config :EXTENSIONS 0)))
|
(def extensions-enabled? (enabled? (get-config :EXTENSIONS 0)))
|
||||||
(def hardwallet-enabled? (enabled? (get-config :HARDWALLET_ENABLED 0)))
|
(def hardwallet-enabled? (enabled? (get-config :HARDWALLET_ENABLED 0)))
|
||||||
|
(def dev-build? (enabled? (get-config :DEV_BUILD 0)))
|
||||||
|
|
||||||
;; CONFIG VALUES
|
;; CONFIG VALUES
|
||||||
(def log-level
|
(def log-level
|
||||||
|
|
|
@ -118,8 +118,15 @@ if (process.argv.indexOf('--pipe') != -1) {
|
||||||
console.log = console.error
|
console.log = console.error
|
||||||
rnUbuntuServer(process.stdin, process.stdout);
|
rnUbuntuServer(process.stdin, process.stdout);
|
||||||
} else {
|
} else {
|
||||||
|
var port = process.env['REACT_SERVER_PORT'] || 5000;
|
||||||
|
process.argv.forEach((val) => {
|
||||||
|
if (val.indexOf('--port') != -1) {
|
||||||
|
port = val.substring(7);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
var server = net.createServer((sock) => {
|
var server = net.createServer((sock) => {
|
||||||
DEBUG && console.error("-- Connection from RN client");
|
DEBUG && console.error("-- Connection from RN client");
|
||||||
rnUbuntuServer(sock, sock);
|
rnUbuntuServer(sock, sock);
|
||||||
}).listen(5000, function() { console.error("-- Server starting") });
|
}).listen(port, function() { console.error("-- Server starting") });
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue