forked from parse-community/node-apn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
46 lines (36 loc) · 847 Bytes
/
index.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
45
46
const http2 = require('http2');
const debug = require('debug')('apn');
debug.log = console.log.bind(console);
const credentials = require('./lib/credentials')({
logger: debug,
});
const config = require('./lib/config')({
logger: debug,
prepareCertificate: credentials.certificate,
prepareToken: credentials.token,
prepareCA: credentials.ca,
});
const Client = require('./lib/client')({
logger: debug,
config,
http2,
});
const MultiClient = require('./lib/multiclient')({
Client,
});
const Provider = require('./lib/provider')({
logger: debug,
Client,
});
const MultiProvider = require('./lib/provider')({
logger: debug,
Client: MultiClient,
});
const Notification = require('./lib/notification');
const token = require('./lib/token');
module.exports = {
Provider,
MultiProvider,
Notification,
token,
};