Adding vlc host enviroment variable
This commit is contained in:
parent
f637b425c3
commit
2611743592
@ -11,7 +11,11 @@ const httpp = require("http");
|
|||||||
var http = httpp.createServer();
|
var http = httpp.createServer();
|
||||||
const io = require("socket.io");
|
const io = require("socket.io");
|
||||||
//var ioClient = require("socket.io-client")("http://192.168.1.142:5000", {reconnect:true});
|
//var ioClient = require("socket.io-client")("http://192.168.1.142:5000", {reconnect:true});
|
||||||
var ioClient = require("socket.io-client")("http://localhost:5000", { reconnect: true });
|
var vlchost = "localhost";
|
||||||
|
if (process.env.vlchost) {
|
||||||
|
vlchost = process.env.vlchost;
|
||||||
|
}
|
||||||
|
var ioClient = require("socket.io-client")("http://" + vlchost + ":5000", { reconnect: true });
|
||||||
ioClient.on("connect", () => {
|
ioClient.on("connect", () => {
|
||||||
console.log("connected");
|
console.log("connected");
|
||||||
});
|
});
|
||||||
|
File diff suppressed because one or more lines are too long
@ -11,7 +11,11 @@ import * as httpp from "http";
|
|||||||
var http = httpp.createServer();
|
var http = httpp.createServer();
|
||||||
import io = require("socket.io");
|
import io = require("socket.io");
|
||||||
//var ioClient = require("socket.io-client")("http://192.168.1.142:5000", {reconnect:true});
|
//var ioClient = require("socket.io-client")("http://192.168.1.142:5000", {reconnect:true});
|
||||||
var ioClient = require("socket.io-client")("http://localhost:5000", {reconnect:true});
|
var vlchost = "localhost";
|
||||||
|
if(process.env.vlchost){
|
||||||
|
vlchost = process.env.vlchost;
|
||||||
|
}
|
||||||
|
var ioClient = require("socket.io-client")("http://" + vlchost + ":5000", {reconnect:true});
|
||||||
ioClient.on("connect", ()=>{
|
ioClient.on("connect", ()=>{
|
||||||
console.log("connected");
|
console.log("connected");
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user