fix Saldo when press refuse coins.
fix Risolvere problema del ritardo quando si fa il primo login...
This commit is contained in:
@@ -48,7 +48,18 @@ if ((process.env.NODE_ENV === 'production') ||
|
||||
};
|
||||
var https = require('https');
|
||||
} else {
|
||||
var http = require('http');
|
||||
if (process.env.HTTPS_LOCALHOST) {
|
||||
var privateKey = fs.readFileSync(process.env.PATH_CERT_KEY, 'utf8');
|
||||
var certificate = fs.readFileSync(process.env.PATH_SERVER_CRT, 'utf8');
|
||||
var credentials = {
|
||||
key: privateKey,
|
||||
cert: certificate,
|
||||
};
|
||||
var https = require('https');
|
||||
|
||||
} else {
|
||||
var http = require('http');
|
||||
}
|
||||
}
|
||||
|
||||
console.log('DB: ' + process.env.DATABASE);
|
||||
@@ -220,7 +231,7 @@ myLoad().then(ris => {
|
||||
}
|
||||
|
||||
if ((process.env.NODE_ENV === 'production') ||
|
||||
(process.env.NODE_ENV === 'test')) {
|
||||
(process.env.NODE_ENV === 'test') || process.env.HTTPS_LOCALHOST) {
|
||||
var httpsServer = https.createServer(credentials, app);
|
||||
console.log('httpsServer: port ', port);
|
||||
httpsServer.listen(port);
|
||||
|
||||
Reference in New Issue
Block a user