24 lines
728 B
TypeScript
24 lines
728 B
TypeScript
import type { CapacitorConfig } from '@capacitor/cli';
|
|
|
|
const serverUrl = process.env.METALCIRCLE_SERVER_URL || 'https://konzerte.pinguholic.de/';
|
|
const localTest = process.env.METALCIRCLE_LOCAL_TEST === '1';
|
|
if (!serverUrl.startsWith('https://') && !(localTest && /^http:\/\/(127\.0\.0\.1|localhost):\d+\/?$/.test(serverUrl))) {
|
|
throw new Error('MetalCircle requires HTTPS, or explicit localhost test mode.');
|
|
}
|
|
|
|
const config: CapacitorConfig = {
|
|
appId: 'de.pinguholic.concerts',
|
|
appName: 'MetalCircle',
|
|
webDir: 'www',
|
|
loggingBehavior: 'none',
|
|
plugins: {
|
|
PushNotifications: { presentationOptions: ['sound', 'alert'] }
|
|
},
|
|
server: {
|
|
url: serverUrl,
|
|
cleartext: localTest
|
|
}
|
|
};
|
|
|
|
export default config;
|