-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
executable file
·34 lines (25 loc) · 780 Bytes
/
index.js
File metadata and controls
executable file
·34 lines (25 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
Load Twilio configuration from .env config file - the following environment
variables should be set:
process.env.TWILIO_ACCOUNT_SID
process.env.TWILIO_API_KEY
process.env.TWILIO_API_SECRET
process.env.TWILIO_CONFIGURATION_SID
*/
require('dotenv').load();
var http = require('http');
var path = require('path');
var express = require('express');
// Create Express webapp
var app = express();
app.use(express.static(path.join(__dirname, 'public')));
app.get('/restore', function(request,res){
console.log("removing all users ");
return;
});
// Create http server and run it
var server = http.createServer(app);
var port = process.env.PORT || 443 ;
server.listen(port, "0.0.0.0", function() {
console.log('Express server running on 0.0.0.0:' + port);
});