forked from Cutlery/immich
		
	chore: run web (only) with remote backend (#2196)
This commit is contained in:
		
							parent
							
								
									ab5b92ae68
								
							
						
					
					
						commit
						1f17720be2
					
				@ -43,6 +43,18 @@ The mobile app `(/mobile)` will required Flutter toolchain to be installed on yo
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
Please refer to the [Flutter's official documentation](https://flutter.dev/docs/get-started/install) for more information on setting up the toolchain on your machine.
 | 
					Please refer to the [Flutter's official documentation](https://flutter.dev/docs/get-started/install) for more information on setting up the toolchain on your machine.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Connect to a remote backend
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					If you only want to do web development connected to an existing, remote backend, follow these steps:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					1. Enter the web directory - `cd web/`
 | 
				
			||||||
 | 
					2. Install web dependencies - `npm i`
 | 
				
			||||||
 | 
					3. Start the web development server
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					PUBLIC_IMMICH_SERVER_URL=https://demo.immich.app/api npm run dev
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## IDE setup
 | 
					## IDE setup
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Lint / format extensions
 | 
					### Lint / format extensions
 | 
				
			||||||
 | 
				
			|||||||
@ -9,6 +9,19 @@ const config = {
 | 
				
			|||||||
			'@api': path.resolve('./src/api')
 | 
								'@api': path.resolve('./src/api')
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
						server: {
 | 
				
			||||||
 | 
							// connect to a remote backend during web-only development
 | 
				
			||||||
 | 
							proxy: {
 | 
				
			||||||
 | 
								'/api': {
 | 
				
			||||||
 | 
									target: process.env.PUBLIC_IMMICH_SERVER_URL,
 | 
				
			||||||
 | 
									secure: true,
 | 
				
			||||||
 | 
									changeOrigin: true,
 | 
				
			||||||
 | 
									logLevel: 'debug',
 | 
				
			||||||
 | 
									rewrite: (path) => path.replace(/^\/api/, ''),
 | 
				
			||||||
 | 
									ws: true
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
	plugins: [sveltekit()]
 | 
						plugins: [sveltekit()]
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user