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