mirror of
https://github.com/ianramzy/decentralized-video-chat.git
synced 2024-11-23 18:49:21 +08:00
heroku ssl attempt
This commit is contained in:
parent
73b50708d3
commit
1d5a2091f6
5
package-lock.json
generated
5
package-lock.json
generated
@ -538,6 +538,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz",
|
||||||
"integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk="
|
"integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk="
|
||||||
},
|
},
|
||||||
|
"heroku-ssl-redirect": {
|
||||||
|
"version": "0.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/heroku-ssl-redirect/-/heroku-ssl-redirect-0.0.4.tgz",
|
||||||
|
"integrity": "sha1-IboHB6pQO1CkEqCUar+qiO99CCw="
|
||||||
|
},
|
||||||
"http-errors": {
|
"http-errors": {
|
||||||
"version": "1.7.2",
|
"version": "1.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
|
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dotenv": "^8.1.0",
|
"dotenv": "^8.1.0",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
|
"heroku-ssl-redirect": "0.0.4",
|
||||||
"socket.io": "^2.2.0",
|
"socket.io": "^2.2.0",
|
||||||
"twilio": "^3.34.0"
|
"twilio": "^3.34.0"
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
require('dotenv').config();
|
require('dotenv').config();
|
||||||
|
var sslRedirect = require('heroku-ssl-redirect');
|
||||||
var twilio = require('twilio')(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);
|
var twilio = require('twilio')(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);
|
||||||
var express = require('express');
|
var express = require('express');
|
||||||
var app = express();
|
var app = express();
|
||||||
@ -8,7 +8,8 @@ var io = require('socket.io')(http);
|
|||||||
var path = require('path');
|
var path = require('path');
|
||||||
var public = path.join(__dirname, 'public');
|
var public = path.join(__dirname, 'public');
|
||||||
|
|
||||||
|
// enable ssl redirect
|
||||||
|
app.use(sslRedirect());
|
||||||
app.use(express.static('public'));
|
app.use(express.static('public'));
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user