WIP
This commit is contained in:
22
src/index.js
22
src/index.js
@@ -1,11 +1,11 @@
|
|||||||
import pdfLib from "pdf-to-printer";
|
import pdfLib from "pdf-to-printer";
|
||||||
import { jsPDF } from "jspdf";
|
import { jsPDF } from "jspdf";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import puppeteer from 'puppeteer';
|
import puppeteer from "puppeteer";
|
||||||
import express from 'express';
|
import express from "express";
|
||||||
import Joi from 'joi';
|
import Joi from "joi";
|
||||||
import TelegramBot from 'node-telegram-bot-api';
|
import TelegramBot from "node-telegram-bot-api";
|
||||||
import https from 'https';
|
import https from "https";
|
||||||
|
|
||||||
const Logo = fs.readFileSync("./assets/Logo_fwaur.png", { encoding: "latin1" });
|
const Logo = fs.readFileSync("./assets/Logo_fwaur.png", { encoding: "latin1" });
|
||||||
const config = JSON.parse(fs.readFileSync("./config.json", "utf8"));
|
const config = JSON.parse(fs.readFileSync("./config.json", "utf8"));
|
||||||
@@ -25,16 +25,14 @@ const PORT = config.port || 2000;
|
|||||||
const cacheFolder = "./cache/";
|
const cacheFolder = "./cache/";
|
||||||
|
|
||||||
// Certificate
|
// Certificate
|
||||||
const privateKey = fs.readFileSync('./assets/ssl/localhost/localhost.decrypted.key');
|
const privateKey = fs.readFileSync("./assets/ssl/localhost/localhost.decrypted.key");
|
||||||
const certificate = fs.readFileSync('./assets/ssl/localhost/localhost.crt');
|
const certificate = fs.readFileSync("./assets/ssl/localhost/localhost.crt");
|
||||||
|
|
||||||
const credentials = {
|
const credentials = {
|
||||||
key: privateKey,
|
key: privateKey,
|
||||||
cert: certificate
|
cert: certificate,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let bot = null;
|
let bot = null;
|
||||||
|
|
||||||
const messageIDs = [1034133487];
|
const messageIDs = [1034133487];
|
||||||
@@ -198,8 +196,4 @@ const httpsServer = https.createServer(credentials, app);
|
|||||||
|
|
||||||
httpsServer.listen(PORT, () => {
|
httpsServer.listen(PORT, () => {
|
||||||
console.log(`PDF Printing Service listening on port ${PORT}`);
|
console.log(`PDF Printing Service listening on port ${PORT}`);
|
||||||
<<<<<<< HEAD
|
|
||||||
});
|
});
|
||||||
=======
|
|
||||||
});
|
|
||||||
>>>>>>> f7a7fa7d73eb3cc7af05ff42d4a8f9eefeae2aec
|
|
||||||
|
|||||||
Reference in New Issue
Block a user