-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
30 lines (17 loc) · 683 Bytes
/
app.js
File metadata and controls
30 lines (17 loc) · 683 Bytes
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
`use strict`;
const { createSecureServer } = require(`http2`);
const { createHash } = require(`crypto`);
const { readFileSync } = require(`fs`);
const { Sql, Tools } = require(`./tools`);
const { Call, fillSwap, io, mailbee, pollPay} = require(`./route`);
Sql.Sql([readFileSync(`bin/sql/sql.sql`, {encoding: `utf8`}), () => {}]);
let App = createSecureServer({
key: readFileSync(`bin/http2/ssl/privkey.pem`),
cert: readFileSync(`bin/http2/ssl/fullchain.pem`),
allowHTTP1: true}, (call, put) => {Call([call, put]);});
App.on(`error`, (err) => console.error(err));
App.listen(8124);
io(require(`socket.io`)(App));
fillSwap();
//mailbee();
Tools.plot([(Spot) => {}]);