mirror of
				https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
				synced 2025-10-31 15:01:07 +08:00 
			
		
		
		
	Fixed express port issue
This commit is contained in:
		
							parent
							
								
									6169ff5255
								
							
						
					
					
						commit
						5eceb8d72b
					
				
							
								
								
									
										5
									
								
								backend/src/vendor/express.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								backend/src/vendor/express.js
									
									
									
									
										vendored
									
									
								
							| @ -1,7 +1,8 @@ | ||||
| /* eslint-disable no-undef */ | ||||
| import { ENV } from './open-api'; | ||||
| 
 | ||||
| export default function express({ substore: $, port } = { port: 3000 }) { | ||||
| export default function express({ substore: $, port }) { | ||||
|     port = port || process.env.PORT || 3000; | ||||
|     const { isNode } = ENV(); | ||||
|     const DEFAULT_HEADERS = { | ||||
|         'Content-Type': 'text/plain;charset=UTF-8', | ||||
| @ -29,7 +30,7 @@ export default function express({ substore: $, port } = { port: 3000 }) { | ||||
|         // adapter
 | ||||
|         app.start = () => { | ||||
|             app.listen(port, () => { | ||||
|                 $.log(`Express started on port: ${port}`); | ||||
|                 $.info(`Express started on port: ${port}`); | ||||
|             }); | ||||
|         }; | ||||
|         return app; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Peng-YM
						Peng-YM