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