mirror of
				https://gitlab.com/MrFry/qmining-page
				synced 2025-04-01 20:23:44 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			805 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			805 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| // eslint-disable-next-line no-undef
 | |
| const useLocalhost = process && process.env.NODE_ENV === 'development'
 | |
| // eslint-disable-next-line no-undef
 | |
| const domain = process && process.env.DOMAIN
 | |
| 
 | |
| if (!domain && !useLocalhost) {
 | |
|   throw new Error('Domain is not defined! Please set DOMAIN env variable!')
 | |
| }
 | |
| 
 | |
| const constants = {
 | |
|   domain: domain || 'localhost',
 | |
|   // FIXME: remove siteUrl, replace with Link
 | |
|   siteUrl: useLocalhost ? 'http://localhost:8080/' : `https://${domain}/`,
 | |
|   apiUrl: useLocalhost
 | |
|     ? 'http://localhost:8080/api/'
 | |
|     : `https://${domain}/api/`,
 | |
|   chatUrl: useLocalhost ? 'http://localhost:8080/' : `https://${domain}/`,
 | |
|   mobileWindowWidth: 700,
 | |
|   maxQuestionsToRender: 250,
 | |
|   imageExts: ['gif', 'png', 'jpeg', 'jpg'],
 | |
|   videoExts: ['mp4', 'mkv', 'webm'],
 | |
| }
 | |
| 
 | |
| export default constants
 |