comment out https
This commit is contained in:
		
							
								
								
									
										20
									
								
								app.js
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								app.js
									
									
									
									
									
								
							| @@ -9,13 +9,13 @@ const fs = require('fs'); | ||||
|  | ||||
| const hostname = 'petrov.nexus'; | ||||
| const httpPort = 4080; | ||||
| const httpsPort = 443; | ||||
| //const httpsPort = 443; | ||||
|  | ||||
| const httpsOptions = { | ||||
|   key: fs.readFileSync('./archive/server.key'), | ||||
|   cert: fs.readFileSync('./archive/petrov_nexus.crt'), | ||||
|   ca: fs.readFileSync('./archive/petrov_nexus.ca-bundle') | ||||
| }; | ||||
| // const httpsOptions = { | ||||
| //   key: fs.readFileSync('./archive/server.key'), | ||||
| //   cert: fs.readFileSync('./archive/petrov_nexus.crt'), | ||||
| //   ca: fs.readFileSync('./archive/petrov_nexus.ca-bundle') | ||||
| // }; | ||||
|  | ||||
| // vključimo mongoose in ga povežemo z MongoDB | ||||
| var mongoose = require('mongoose'); | ||||
| @@ -30,7 +30,7 @@ db.on('error', console.error.bind(console, 'MongoDB connection error:')); | ||||
| var app = express(); | ||||
|  | ||||
| const httpServer = http.createServer(app); | ||||
| const httpsServer = https.createServer(httpsOptions, app); | ||||
| //const httpsServer = https.createServer(httpsOptions, app); | ||||
|  | ||||
| // view engine setup | ||||
| app.set('views', path.join(__dirname, 'views')); | ||||
| @@ -71,8 +71,8 @@ app.use(function (err, req, res, next) { | ||||
| httpServer.listen(httpPort, () => { | ||||
|   console.log(`Server running at http://${hostname}:${httpPort}/`); | ||||
| }); | ||||
| httpsServer.listen(httpsPort, () => { | ||||
|   console.log(`Server running at https://${hostname}:${httpsPort}/`); | ||||
| }); | ||||
| // httpsServer.listen(httpsPort, () => { | ||||
| //   console.log(`Server running at https://${hostname}:${httpsPort}/`); | ||||
| // }); | ||||
|  | ||||
| module.exports = app; | ||||
		Reference in New Issue
	
	Block a user
	 Nikola Petrov
					Nikola Petrov