Compare commits
No commits in common. "1ff5c302511078687a81b6466ab16551f5ab705e" and "4ff7dad6f107d662e6389e5bcb15b2269de3e4ac" have entirely different histories.
1ff5c30251
...
4ff7dad6f1
254 changed files with 1647 additions and 868 deletions
94
app.js
94
app.js
|
|
@ -1,61 +1,61 @@
|
||||||
//NOTE: SERVER CONFIGURATION has 2 options. ENABLE 1 of 2 options
|
//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
|
// //prepare credentials & etc
|
||||||
var fs = require('fs');
|
// var fs = require('fs');
|
||||||
var https = require('https');
|
// var https = require('https');
|
||||||
var privateKey = fs.readFileSync('/etc/letsencrypt/live/choir.run/privkey.pem', 'utf8');
|
// 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 certificate = fs.readFileSync('/etc/letsencrypt/live/choir.run/fullchain.pem', 'utf8');
|
||||||
var credentials = {
|
// var credentials = {
|
||||||
key: privateKey,
|
// key: privateKey,
|
||||||
cert: certificate
|
// cert: certificate
|
||||||
};
|
// };
|
||||||
|
|
||||||
//https WWW server @ port 443
|
// //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');
|
|
||||||
// var express = require('express');
|
// var express = require('express');
|
||||||
// var app = express();
|
// var app = express();
|
||||||
// var httpServer = http.createServer(app);
|
// var httpsWebServer = https.createServer(credentials, app).listen(443, function() {
|
||||||
// httpServer.listen(8080);
|
// console.log('[express] listening on *:443');
|
||||||
|
// });
|
||||||
|
|
||||||
// //http socket.io server @ port 8080 (same port as WWW service)
|
// //http Redirection server @ port 80
|
||||||
// var io = require('socket.io')(httpServer, {
|
// // ==> 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,
|
// 'pingInterval': 1000,
|
||||||
// 'pingTimeout': 3000
|
// '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
|
//express configuration
|
||||||
app.use(express.static('public'));
|
app.use(express.static('public'));
|
||||||
|
|
||||||
|
|
|
||||||
2226
package-lock.json
generated
2226
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.
BIN
public/audio/beach/ogg/두드리는01.ogg
Normal file
BIN
public/audio/beach/ogg/두드리는01.ogg
Normal file
Binary file not shown.
BIN
public/audio/beach/ogg/두드리는02.ogg
Normal file
BIN
public/audio/beach/ogg/두드리는02.ogg
Normal file
Binary file not shown.
BIN
public/audio/beach/ogg/두드리는03.ogg
Normal file
BIN
public/audio/beach/ogg/두드리는03.ogg
Normal file
Binary file not shown.
BIN
public/audio/beach/ogg/두드리는04.ogg
Normal file
BIN
public/audio/beach/ogg/두드리는04.ogg
Normal file
Binary file not shown.
BIN
public/audio/beach/ogg/두드리는06.ogg
Normal file
BIN
public/audio/beach/ogg/두드리는06.ogg
Normal file
Binary file not shown.
BIN
public/audio/beach/ogg/모래걸음.ogg
Normal file
BIN
public/audio/beach/ogg/모래걸음.ogg
Normal file
Binary file not shown.
BIN
public/audio/beach/ogg/물소리.ogg
Normal file
BIN
public/audio/beach/ogg/물소리.ogg
Normal file
Binary file not shown.
BIN
public/audio/beach/ogg/물장구.ogg
Normal file
BIN
public/audio/beach/ogg/물장구.ogg
Normal file
Binary file not shown.
BIN
public/audio/beach/ogg/손장구.ogg
Normal file
BIN
public/audio/beach/ogg/손장구.ogg
Normal file
Binary file not shown.
BIN
public/audio/beach/ogg/운더강강술래.ogg
Normal file
BIN
public/audio/beach/ogg/운더강강술래.ogg
Normal file
Binary file not shown.
BIN
public/audio/beach/ogg/웃음.ogg
Normal file
BIN
public/audio/beach/ogg/웃음.ogg
Normal file
Binary file not shown.
BIN
public/audio/beach/ogg/젖은모래쓸어내기.ogg
Normal file
BIN
public/audio/beach/ogg/젖은모래쓸어내기.ogg
Normal file
Binary file not shown.
BIN
public/audio/beach/ogg/천막긁는.ogg
Normal file
BIN
public/audio/beach/ogg/천막긁는.ogg
Normal file
Binary file not shown.
BIN
public/audio/beach/ogg/풍덩.ogg
Normal file
BIN
public/audio/beach/ogg/풍덩.ogg
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
public/audio/beach/두드리는01.mp3
Normal file
BIN
public/audio/beach/두드리는01.mp3
Normal file
Binary file not shown.
BIN
public/audio/beach/두드리는02.mp3
Normal file
BIN
public/audio/beach/두드리는02.mp3
Normal file
Binary file not shown.
BIN
public/audio/beach/두드리는03.mp3
Normal file
BIN
public/audio/beach/두드리는03.mp3
Normal file
Binary file not shown.
BIN
public/audio/beach/두드리는04.mp3
Normal file
BIN
public/audio/beach/두드리는04.mp3
Normal file
Binary file not shown.
BIN
public/audio/beach/두드리는06.mp3
Normal file
BIN
public/audio/beach/두드리는06.mp3
Normal file
Binary file not shown.
BIN
public/audio/beach/모래걸음.mp3
Normal file
BIN
public/audio/beach/모래걸음.mp3
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
public/audio/beach/물소리.mp3
Normal file
BIN
public/audio/beach/물소리.mp3
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
public/audio/beach/손장구.mp3
Normal file
BIN
public/audio/beach/손장구.mp3
Normal file
Binary file not shown.
BIN
public/audio/beach/운더강강술래.mp3
Normal file
BIN
public/audio/beach/운더강강술래.mp3
Normal file
Binary file not shown.
BIN
public/audio/beach/웃음.mp3
Normal file
BIN
public/audio/beach/웃음.mp3
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
public/audio/beach/젖은모래쓸어내기.mp3
Normal file
BIN
public/audio/beach/젖은모래쓸어내기.mp3
Normal file
Binary file not shown.
BIN
public/audio/beach/천막긁는.mp3
Normal file
BIN
public/audio/beach/천막긁는.mp3
Normal file
Binary file not shown.
BIN
public/audio/beach/풍덩.mp3
Normal file
BIN
public/audio/beach/풍덩.mp3
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
public/audio/bridgeA/ogg/고향돌리도.ogg
Normal file
BIN
public/audio/bridgeA/ogg/고향돌리도.ogg
Normal file
Binary file not shown.
BIN
public/audio/bridgeA/ogg/동물소리흉내.ogg
Normal file
BIN
public/audio/bridgeA/ogg/동물소리흉내.ogg
Normal file
Binary file not shown.
BIN
public/audio/bridgeA/ogg/동물소리흉내02.ogg
Normal file
BIN
public/audio/bridgeA/ogg/동물소리흉내02.ogg
Normal file
Binary file not shown.
BIN
public/audio/bridgeA/ogg/동물소리흉내03.ogg
Normal file
BIN
public/audio/bridgeA/ogg/동물소리흉내03.ogg
Normal file
Binary file not shown.
BIN
public/audio/bridgeA/ogg/모래야돌아와.ogg
Normal file
BIN
public/audio/bridgeA/ogg/모래야돌아와.ogg
Normal file
Binary file not shown.
BIN
public/audio/bridgeA/ogg/물소리가있었다.ogg
Normal file
BIN
public/audio/bridgeA/ogg/물소리가있었다.ogg
Normal file
Binary file not shown.
BIN
public/audio/bridgeA/ogg/우와.ogg
Normal file
BIN
public/audio/bridgeA/ogg/우와.ogg
Normal file
Binary file not shown.
BIN
public/audio/bridgeA/ogg/이거물에넣고해도되요.ogg
Normal file
BIN
public/audio/bridgeA/ogg/이거물에넣고해도되요.ogg
Normal file
Binary file not shown.
BIN
public/audio/bridgeA/ogg/흰수마자돌아와.ogg
Normal file
BIN
public/audio/bridgeA/ogg/흰수마자돌아와.ogg
Normal file
Binary file not shown.
BIN
public/audio/bridgeA/ogg/흰수마자어디갔니.ogg
Normal file
BIN
public/audio/bridgeA/ogg/흰수마자어디갔니.ogg
Normal file
Binary file not shown.
BIN
public/audio/bridgeA/고향돌리도.mp3
Normal file
BIN
public/audio/bridgeA/고향돌리도.mp3
Normal file
Binary file not shown.
BIN
public/audio/bridgeA/동물소리흉내.mp3
Normal file
BIN
public/audio/bridgeA/동물소리흉내.mp3
Normal file
Binary file not shown.
BIN
public/audio/bridgeA/동물소리흉내02.mp3
Normal file
BIN
public/audio/bridgeA/동물소리흉내02.mp3
Normal file
Binary file not shown.
BIN
public/audio/bridgeA/동물소리흉내03.mp3
Normal file
BIN
public/audio/bridgeA/동물소리흉내03.mp3
Normal file
Binary file not shown.
BIN
public/audio/bridgeA/모래야돌아와.mp3
Normal file
BIN
public/audio/bridgeA/모래야돌아와.mp3
Normal file
Binary file not shown.
BIN
public/audio/bridgeA/물소리가있었다.mp3
Normal file
BIN
public/audio/bridgeA/물소리가있었다.mp3
Normal file
Binary file not shown.
BIN
public/audio/bridgeA/우와.mp3
Normal file
BIN
public/audio/bridgeA/우와.mp3
Normal file
Binary file not shown.
BIN
public/audio/bridgeA/이거물에넣고해도되요.mp3
Normal file
BIN
public/audio/bridgeA/이거물에넣고해도되요.mp3
Normal file
Binary file not shown.
BIN
public/audio/bridgeA/흰수마자돌아와.mp3
Normal file
BIN
public/audio/bridgeA/흰수마자돌아와.mp3
Normal file
Binary file not shown.
BIN
public/audio/bridgeA/흰수마자어디갔니.mp3
Normal file
BIN
public/audio/bridgeA/흰수마자어디갔니.mp3
Normal file
Binary file not shown.
BIN
public/audio/path/ogg/가을아침.ogg
Normal file
BIN
public/audio/path/ogg/가을아침.ogg
Normal file
Binary file not shown.
BIN
public/audio/path/ogg/내나이.ogg
Normal file
BIN
public/audio/path/ogg/내나이.ogg
Normal file
Binary file not shown.
BIN
public/audio/path/ogg/노래.ogg
Normal file
BIN
public/audio/path/ogg/노래.ogg
Normal file
Binary file not shown.
BIN
public/audio/path/ogg/사랑을했따.ogg
Normal file
BIN
public/audio/path/ogg/사랑을했따.ogg
Normal file
Binary file not shown.
BIN
public/audio/path/ogg/아아아아.ogg
Normal file
BIN
public/audio/path/ogg/아아아아.ogg
Normal file
Binary file not shown.
BIN
public/audio/path/ogg/하모니카.ogg
Normal file
BIN
public/audio/path/ogg/하모니카.ogg
Normal file
Binary file not shown.
BIN
public/audio/path/ogg/합주.ogg
Normal file
BIN
public/audio/path/ogg/합주.ogg
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue