-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.ts
43 lines (34 loc) · 1.21 KB
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import {enableProdMode} from "@angular/core";
import {platformBrowserDynamic} from "@angular/platform-browser-dynamic";
import awsconfig from "./aws-exports";
import "@angular/compiler";
import {AppModule} from "./app/app.module";
import {environment} from "./environments/environment";
import Amplify, {Logger} from "@aws-amplify/core";
import "regenerator-runtime/runtime";
const log = new Logger("main");
try {
// API.configure(awsconfig);
// PubSub.configure(awsconfig);
Amplify.configure(awsconfig);
// Storage.configure({ level: 'private' });
if (environment.production) {
enableProdMode();
Amplify.Logger.LOG_LEVEL = "INFO";
} else {
Amplify.Logger.LOG_LEVEL = "DEBUG";
}
if (window.location.search.indexOf("__debug__") >= 0) {
Amplify.Logger.LOG_LEVEL = "VERBOSE";
}
log.info("**********************************");
log.info("*** Social Sensing Version " + environment.version);
log.info("**********************************");
log.info("");
const bootstrap = () => platformBrowserDynamic().bootstrapModule(AppModule);
bootstrap().catch(err => log.debug(err));
$("#loading-div-img").attr("src", "assets/loading-2.jpg");
} catch (e) {
log.error(e);
log.error("FATAL ERROR");
}