Compare commits

...

10 commits

Author SHA1 Message Date
1ff5c30251 last status @ amazon server 2021-09-29 15:09:29 +00:00
bf6c3f82ff day4 .. conductor sound file update 2018-11-11 00:33:24 +09:00
19073322b6 day4 sound file update 2018-11-11 00:31:35 +09:00
doohoyi
d1bd23eb09 day3 .. update 2 2018-10-28 05:40:15 +09:00
doohoyi
b18dde24ea day3 .. update sounds. 2018-10-28 05:34:39 +09:00
doohoyi
cfa3399511 day3 .. bug fix. 2018-10-28 05:27:51 +09:00
doohoyi
47cda20dd6 day3 sound files update 2018-10-28 05:25:24 +09:00
b2a56f2aa0 day2 .. fix missing audio files.. (clap) 2018-10-14 01:38:51 +09:00
657ea63fae day2 sound order update. 2018-10-14 01:35:56 +09:00
9736731ae8 day2 audio files 2018-10-14 01:14:31 +09:00
254 changed files with 871 additions and 1650 deletions

94
app.js
View file

@ -1,61 +1,61 @@
//NOTE: SERVER CONFIGURATION has 2 options. ENABLE 1 of 2 options
// //NOTE: option (1) - https server (443) + redirection 80 to 443
//NOTE: option (1) - https server (443) + redirection 80 to 443
// //prepare credentials & etc
// var fs = require('fs');
// var https = require('https');
// var privateKey = fs.readFileSync('/etc/letsencrypt/live/choir.run/privkey.pem', 'utf8');
// var certificate = fs.readFileSync('/etc/letsencrypt/live/choir.run/fullchain.pem', 'utf8');
// var credentials = {
// key: privateKey,
// cert: certificate
// };
//prepare credentials & etc
var fs = require('fs');
var https = require('https');
var privateKey = fs.readFileSync('/etc/letsencrypt/live/choir.run/privkey.pem', 'utf8');
var certificate = fs.readFileSync('/etc/letsencrypt/live/choir.run/fullchain.pem', 'utf8');
var credentials = {
key: privateKey,
cert: certificate
};
// //https WWW server @ port 443
// var express = require('express');
// var app = express();
// var httpsWebServer = https.createServer(credentials, app).listen(443, function() {
// console.log('[express] listening on *:443');
// });
// //http Redirection server @ port 80
// // ==> Don't get why this works.. all others not. ==> https://stackoverflow.com/a/23283173
// var http = require('http');
// var httpApp = express();
// var httpRouter = express.Router();
// httpApp.use('*', httpRouter);
// httpRouter.get('*', function(req, res) {
// var host = req.get('Host');
// // replace the port in the host
// host = host.replace(/:\d+$/, ":" + app.get('port'));
// // determine the redirect destination
// var destination = ['https://', host, req.url].join('');
// return res.redirect(destination);
// });
// var httpServer = http.createServer(httpApp);
// httpServer.listen(80);
// //https socket.io server @ port 443 (same port as WWW service)
// var io = require('socket.io')(httpsWebServer, {
// 'pingInterval': 1000,
// 'pingTimeout': 3000
// });
//NOTE: option (2) - simple http dev server (8080)
var http = require('http');
//https WWW server @ port 443
var express = require('express');
var app = express();
var httpServer = http.createServer(app);
httpServer.listen(8080);
var httpsWebServer = https.createServer(credentials, app).listen(443, function() {
console.log('[express] listening on *:443');
});
//http socket.io server @ port 8080 (same port as WWW service)
var io = require('socket.io')(httpServer, {
//http Redirection server @ port 80
// ==> Don't get why this works.. all others not. ==> https://stackoverflow.com/a/23283173
var http = require('http');
var httpApp = express();
var httpRouter = express.Router();
httpApp.use('*', httpRouter);
httpRouter.get('*', function(req, res) {
var host = req.get('Host');
// replace the port in the host
host = host.replace(/:\d+$/, ":" + app.get('port'));
// determine the redirect destination
var destination = ['https://', host, req.url].join('');
return res.redirect(destination);
});
var httpServer = http.createServer(httpApp);
httpServer.listen(80);
//https socket.io server @ port 443 (same port as WWW service)
var io = require('socket.io')(httpsWebServer, {
'pingInterval': 1000,
'pingTimeout': 3000
});
// //NOTE: option (2) - simple http dev server (8080)
// var http = require('http');
// var express = require('express');
// var app = express();
// var httpServer = http.createServer(app);
// httpServer.listen(8080);
// //http socket.io server @ port 8080 (same port as WWW service)
// var io = require('socket.io')(httpServer, {
// 'pingInterval': 1000,
// 'pingTimeout': 3000
// });
//express configuration
app.use(express.static('public'));

2252
package-lock.json generated

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more