Compare commits
10 commits
4ff7dad6f1
...
1ff5c30251
| Author | SHA1 | Date | |
|---|---|---|---|
| 1ff5c30251 | |||
| bf6c3f82ff | |||
| 19073322b6 | |||
|
|
d1bd23eb09 | ||
|
|
b18dde24ea | ||
|
|
cfa3399511 | ||
|
|
47cda20dd6 | ||
| b2a56f2aa0 | |||
| 657ea63fae | |||
| 9736731ae8 |
254 changed files with 871 additions and 1650 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'));
|
||||||
|
|
||||||
|
|
|
||||||
2238
package-lock.json
generated
2238
package-lock.json
generated
File diff suppressed because it is too large
Load diff
BIN
public/audio-second-trip/beach/까마귀피리.mp3
Normal file
BIN
public/audio-second-trip/beach/까마귀피리.mp3
Normal file
Binary file not shown.
BIN
public/audio-second-trip/beach/모래+카우벨.mp3
Normal file
BIN
public/audio-second-trip/beach/모래+카우벨.mp3
Normal file
Binary file not shown.
BIN
public/audio-second-trip/beach/모래걸음.mp3
Normal file
BIN
public/audio-second-trip/beach/모래걸음.mp3
Normal file
Binary file not shown.
BIN
public/audio-second-trip/beach/모래야돌아와.mp3
Normal file
BIN
public/audio-second-trip/beach/모래야돌아와.mp3
Normal file
Binary file not shown.
BIN
public/audio-second-trip/beach/모래차기.mp3
Normal file
BIN
public/audio-second-trip/beach/모래차기.mp3
Normal file
Binary file not shown.
BIN
public/audio-second-trip/beach/모래차기02.mp3
Normal file
BIN
public/audio-second-trip/beach/모래차기02.mp3
Normal file
Binary file not shown.
BIN
public/audio-second-trip/beach/모터.mp3
Normal file
BIN
public/audio-second-trip/beach/모터.mp3
Normal file
Binary file not shown.
BIN
public/audio-second-trip/beach/북소리.mp3
Normal file
BIN
public/audio-second-trip/beach/북소리.mp3
Normal file
Binary file not shown.
BIN
public/audio-second-trip/beach/북치기02.mp3
Normal file
BIN
public/audio-second-trip/beach/북치기02.mp3
Normal file
Binary file not shown.
BIN
public/audio-second-trip/beach/사랑을했다~.mp3
Normal file
BIN
public/audio-second-trip/beach/사랑을했다~.mp3
Normal file
Binary file not shown.
BIN
public/audio-second-trip/beach/상여.mp3
Normal file
BIN
public/audio-second-trip/beach/상여.mp3
Normal file
Binary file not shown.
BIN
public/audio-second-trip/beach/새우깡.mp3
Normal file
BIN
public/audio-second-trip/beach/새우깡.mp3
Normal file
Binary file not shown.
BIN
public/audio-second-trip/beach/와랑바랑뎅데굴.mp3
Normal file
BIN
public/audio-second-trip/beach/와랑바랑뎅데굴.mp3
Normal file
Binary file not shown.
BIN
public/audio-second-trip/beach/하모니카.mp3
Normal file
BIN
public/audio-second-trip/beach/하모니카.mp3
Normal file
Binary file not shown.
BIN
public/audio-third-trip/beach/갈대마디.mp3
Normal file
BIN
public/audio-third-trip/beach/갈대마디.mp3
Normal file
Binary file not shown.
BIN
public/audio-third-trip/beach/나무다리건너.mp3
Normal file
BIN
public/audio-third-trip/beach/나무다리건너.mp3
Normal file
Binary file not shown.
BIN
public/audio-third-trip/beach/낙엽.mp3
Normal file
BIN
public/audio-third-trip/beach/낙엽.mp3
Normal file
Binary file not shown.
BIN
public/audio-third-trip/beach/달팽이종소리.mp3
Normal file
BIN
public/audio-third-trip/beach/달팽이종소리.mp3
Normal file
Binary file not shown.
BIN
public/audio-third-trip/beach/모래놀이.mp3
Normal file
BIN
public/audio-third-trip/beach/모래놀이.mp3
Normal file
Binary file not shown.
BIN
public/audio-third-trip/beach/물소리.mp3
Normal file
BIN
public/audio-third-trip/beach/물소리.mp3
Normal file
Binary file not shown.
BIN
public/audio-third-trip/beach/물장구.mp3
Normal file
BIN
public/audio-third-trip/beach/물장구.mp3
Normal file
Binary file not shown.
BIN
public/audio-third-trip/beach/바람불어오는.mp3
Normal file
BIN
public/audio-third-trip/beach/바람불어오는.mp3
Normal file
Binary file not shown.
BIN
public/audio-third-trip/beach/변했데.mp3
Normal file
BIN
public/audio-third-trip/beach/변했데.mp3
Normal file
Binary file not shown.
BIN
public/audio-third-trip/beach/북+하모니카.mp3
Normal file
BIN
public/audio-third-trip/beach/북+하모니카.mp3
Normal file
Binary file not shown.
BIN
public/audio-third-trip/beach/안녕이름들.mp3
Normal file
BIN
public/audio-third-trip/beach/안녕이름들.mp3
Normal file
Binary file not shown.
BIN
public/audio-third-trip/beach/하모니카.mp3
Normal file
BIN
public/audio-third-trip/beach/하모니카.mp3
Normal file
Binary file not shown.
BIN
public/audio-third-trip/beach/합주.mp3
Normal file
BIN
public/audio-third-trip/beach/합주.mp3
Normal file
Binary file not shown.
BIN
public/audio-third-trip/beach/흥얼거림.mp3
Normal file
BIN
public/audio-third-trip/beach/흥얼거림.mp3
Normal file
Binary file not shown.
BIN
public/audio-third-trip/clap@2/01.mp3
Normal file
BIN
public/audio-third-trip/clap@2/01.mp3
Normal file
Binary file not shown.
BIN
public/audio-third-trip/clap@2/02.mp3
Normal file
BIN
public/audio-third-trip/clap@2/02.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.
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/귀요미물소리.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.
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.
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.
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.
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.
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.
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
Loading…
Reference in a new issue