Adding vlc host enviroment variable

This commit is contained in:
Fabian Stamm 2017-06-22 17:14:27 +02:00
parent f637b425c3
commit 2611743592
3 changed files with 11 additions and 3 deletions

View File

@ -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

View File

@ -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");
}); });