fix: add port fallback (#23)
Add fallback to port 3000, if PORT in env is not defined
This commit is contained in:
		
							parent
							
								
									38d1c3b9f6
								
							
						
					
					
						commit
						b4dbd8ce86
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -28,6 +28,6 @@ app.get("/api/hello", function (req, res) { | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| // listen for requests :)
 | // listen for requests :)
 | ||||||
| var listener = app.listen(process.env.PORT, function () { | var listener = app.listen(process.env.PORT || 3000, function () { | ||||||
|   console.log('Your app is listening on port ' + listener.address().port); |   console.log('Your app is listening on port ' + listener.address().port); | ||||||
| }); | }); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue