Commit 84f8bead authored by yPhil's avatar yPhil
Browse files

HTTPS OK

parent 98181d84
Pipeline #398648 passed with stage
in 39 seconds
......@@ -9,14 +9,15 @@ const petrolette = require('../petrolette'),
var httpServer = http.createServer(petrolette);
httpServer.listen(8000, () => {
console.error('HTTP Server running');
console.debug('HTTP Server running');
});
// const httpsServer = https.createServer({
// key: fs.readFileSync(path.join(__dirname, '../cert/privkey.pem'), 'utf8'),
// cert: fs.readFileSync(path.join(__dirname, '../cert/cert.pem'), 'utf8'),
// }, petrolette);
const httpsServer = https.createServer({
key: fs.readFileSync('/etc/letsencrypt/live/petrolette.space/privkey.pem'),
cert: fs.readFileSync('/etc/letsencrypt/live/petrolette.space/cert.pem'),
ca: fs.readFileSync('/etc/letsencrypt/live/petrolette.space/chain.pem'),
}, petrolette);
// httpsServer.listen(443, () => {
// console.log('HTTPS Server running');
// });
httpsServer.listen(8001, () => {
console.error('HTTPS Server running?');
});
......@@ -26,12 +26,6 @@ app.use('/static', express.static(path.join(__dirname, 'public')));
app.use('/bower', express.static(path.join(__dirname, 'bower_components')));
app.use('/', router);
// app.use(express.static(__dirname, { dotfiles: 'allow' } ));
// app.listen(80, () => {
// console.log('HTTP server running on port 80');
// });
app.use(helmet.originAgentCluster());
app.use(helmet.noSniff());
app.use(bodyParser.json());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment