mirror of
https://github.com/Expand-sys/ccashfrontend
synced 2025-12-18 15:42:14 +11:00
yees
This commit is contained in:
parent
796df3809b
commit
c4aa98d29c
1 changed files with 10 additions and 16 deletions
26
index.js
26
index.js
|
|
@ -3,28 +3,22 @@ require("pino-pretty");
|
||||||
const dotenv = require("dotenv");
|
const dotenv = require("dotenv");
|
||||||
|
|
||||||
dotenv.config({ path: ".env" });
|
dotenv.config({ path: ".env" });
|
||||||
if (process.env.SECURE) {
|
const fs = require("fs");
|
||||||
const fastify = require("fastify")({
|
const path = require("path");
|
||||||
http2: true,
|
const fastify = require("fastify")({
|
||||||
https: {
|
http2: true,
|
||||||
allowHTTP1: true, // fallback support for HTTP1
|
https: {
|
||||||
key: fs.readFileSync(path.join(root, "..", "config", "key.key")),
|
allowHTTP1: true, // fallback support for HTTP1
|
||||||
cert: fs.readFileSync(path.join(root, "..", "config", "cert.cert")),
|
//key: fs.readFileSync(path.join(root, "..", "config", "key.key")),
|
||||||
},
|
//cert: fs.readFileSync(path.join(root, "..", "config", "cert.cert")),
|
||||||
});
|
},
|
||||||
} else {
|
});
|
||||||
const fastify = require("fastify")({
|
|
||||||
//logger: { prettyPrint: true },
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const fastifyFlash = require("fastify-flash");
|
const fastifyFlash = require("fastify-flash");
|
||||||
|
|
||||||
const path = require("path");
|
|
||||||
const got = require("got");
|
const got = require("got");
|
||||||
const url = require("url");
|
const url = require("url");
|
||||||
|
|
||||||
const fs = require("fs");
|
|
||||||
const { CCashClient } = require("ccash-client-js");
|
const { CCashClient } = require("ccash-client-js");
|
||||||
|
|
||||||
fastify.register(require("fastify-formbody"));
|
fastify.register(require("fastify-formbody"));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue