Hostname binding in conf
This commit is contained in:
parent
799c5b3705
commit
ef91e2b2a7
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"isDev": true,
|
"isDev": true,
|
||||||
"http": {
|
"http": {
|
||||||
"baseUrl": "http://localhost:8000",
|
"host": "{{HOSTNAME}}",
|
||||||
"port": 8000
|
"port": 8000
|
||||||
},
|
},
|
||||||
"session": {
|
"session": {
|
||||||
|
|
|
@ -9,6 +9,8 @@ export XMPP_MUC="$(echo ${XMPP_MUC} | sed 's/\//\\\//g')"
|
||||||
export XMPP_STARTUP="$(echo ${XMPP_STARTUP} | sed 's/\//\\\//g')"
|
export XMPP_STARTUP="$(echo ${XMPP_STARTUP} | sed 's/\//\\\//g')"
|
||||||
export XMPP_ADMIN="$(echo ${XMPP_ADMIN} | sed 's/\//\\\//g')"
|
export XMPP_ADMIN="$(echo ${XMPP_ADMIN} | sed 's/\//\\\//g')"
|
||||||
|
|
||||||
|
sed 's/{{HOSTNAME}}/'"${HOSTNAME}"'/' -i /app/config/dev_config.json
|
||||||
|
|
||||||
sed 's/{{XMPP_NAME}}/'"${XMPP_NAME}"'/' -i /app/config/dev_config.json
|
sed 's/{{XMPP_NAME}}/'"${XMPP_NAME}"'/' -i /app/config/dev_config.json
|
||||||
sed 's/{{XMPP_DOMAIN}}/'"${XMPP_DOMAIN}"'/' -i /app/config/dev_config.json
|
sed 's/{{XMPP_DOMAIN}}/'"${XMPP_DOMAIN}"'/' -i /app/config/dev_config.json
|
||||||
sed 's/{{XMPP_WSS}}/'"${XMPP_WSS}"'/' -i /app/config/dev_config.json
|
sed 's/{{XMPP_WSS}}/'"${XMPP_WSS}"'/' -i /app/config/dev_config.json
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"isDev": true,
|
"isDev": true,
|
||||||
"http": {
|
"http": {
|
||||||
"baseUrl": "http://localhost:8000",
|
"host": "localhost",
|
||||||
"port": 8000
|
"port": 8000
|
||||||
},
|
},
|
||||||
"session": {
|
"session": {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"isDev": true,
|
"isDev": true,
|
||||||
"http": {
|
"http": {
|
||||||
"baseUrl": "http://localhost:8000",
|
"host": "localhost",
|
||||||
"port": 8000
|
"port": 8000
|
||||||
},
|
},
|
||||||
"session": {
|
"session": {
|
||||||
|
|
14
server.js
14
server.js
|
@ -46,7 +46,6 @@ app.get('/config.js', function (req, res) {
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get('/sounds/*', function (req, res) {
|
app.get('/sounds/*', function (req, res) {
|
||||||
console.log(req.baseUrl);
|
|
||||||
res.type('audio/wav');
|
res.type('audio/wav');
|
||||||
res.redirect("./public" + req.baseUrl);
|
res.redirect("./public" + req.baseUrl);
|
||||||
});
|
});
|
||||||
|
@ -390,11 +389,10 @@ clientApp.on('ready', function () {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
//https.createServer({
|
app.listen(config.http.port, config.http.host, function () {
|
||||||
// key: fs.readFileSync(config.http.key),
|
console.log('Kaiwa running...');
|
||||||
// cert: fs.readFileSync(config.http.cert)
|
if (config.http.host) {
|
||||||
//}, app).listen(config.http.port);
|
console.log('Hostname:' + config.http.host);
|
||||||
|
}
|
||||||
app.listen(config.http.port, function () {
|
console.log('Port:' + config.http.port);
|
||||||
console.log('Kaiwa running at: ' + config.http.baseUrl);
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue