mirror of
https://github.com/ianramzy/decentralized-video-chat.git
synced 2024-11-23 10:39:20 +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",
|
||||
"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": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
|
||||
|
@ -12,6 +12,7 @@
|
||||
"dependencies": {
|
||||
"dotenv": "^8.1.0",
|
||||
"express": "^4.17.1",
|
||||
"heroku-ssl-redirect": "0.0.4",
|
||||
"socket.io": "^2.2.0",
|
||||
"twilio": "^3.34.0"
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
require('dotenv').config();
|
||||
|
||||
var sslRedirect = require('heroku-ssl-redirect');
|
||||
var twilio = require('twilio')(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);
|
||||
var express = require('express');
|
||||
var app = express();
|
||||
@ -8,7 +8,8 @@ var io = require('socket.io')(http);
|
||||
var path = require('path');
|
||||
var public = path.join(__dirname, 'public');
|
||||
|
||||
|
||||
// enable ssl redirect
|
||||
app.use(sslRedirect());
|
||||
app.use(express.static('public'));
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user