fix: sync config with db only after connection is established
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Build / build (pull_request) Successful in 55s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Build / build (pull_request) Successful in 55s
				
			The error message had regressed in the case where connection could not be established.
This commit is contained in:
		
							parent
							
								
									c4c622d82b
								
							
						
					
					
						commit
						e92f238f7d
					
				@ -28,12 +28,13 @@ import { updateWorldStateCollections } from "./services/worldStateService";
 | 
			
		||||
JSON.stringify = JSONStringify;
 | 
			
		||||
 | 
			
		||||
validateConfig();
 | 
			
		||||
syncConfigWithDatabase();
 | 
			
		||||
 | 
			
		||||
mongoose
 | 
			
		||||
    .connect(config.mongodbUrl)
 | 
			
		||||
    .then(() => {
 | 
			
		||||
        logger.info("Connected to MongoDB");
 | 
			
		||||
        syncConfigWithDatabase();
 | 
			
		||||
 | 
			
		||||
        startWebServer();
 | 
			
		||||
 | 
			
		||||
        void updateWorldStateCollections();
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user