-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
44 lines (34 loc) · 899 Bytes
/
app.js
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
44
app._load();
'use strict';
const App = require('../types/app');
const Person = require('../resources/person');
const Post = require('../resources/post');
const Relationship = require('../resources/relationship');
window.app = new App({
scripts: ['app.js'],
resources: {
'Person': Person,
'Post': Post,
'Relationship': Relationship,
},
authorities: {
}
});
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('/service.js').then(function(registration) {
console.log('[GUARDIAN]', 'ready: ', registration.scope);
}, function(err) {
console.log('[GUARDIAN]', 'failed: ', err);
});
});
}
window.onload = function () {
app.attach(document.querySelector('fabric-application'));
/*/
app._defer('localhost:3000');
/*/
app._defer('maki.io');
/**/
app._explore();
}