Skip to content

Commit 0e5192a

Browse files
committed
middleware
1 parent 7b4bf07 commit 0e5192a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ var http = require('http');
33
var enforce = require('express-sslify');
44

55
var app = express();
6-
app.use('/', express.static(__dirname));
76

87
// use HTTPS(true) in case you are behind a load balancer (e.g. Heroku)
98
if (process.env.NODE_ENV === 'production') {
109
console.log('redirecting to ssl');
1110
app.use(enforce.HTTPS({ trustProtoHeader: true }))
1211
}
12+
13+
app.use('/', express.static(__dirname));
1314

1415
http.createServer(app).listen(process.env.PORT || 3000, function() {
1516
console.log('started');

0 commit comments

Comments
 (0)