3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 20:35:02 +00:00

Encrypt message data at rest

This commit is contained in:
Dragory 2020-09-16 22:32:43 +03:00
parent 3f3d6af4ed
commit baa3a5640e
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
10 changed files with 121 additions and 3 deletions

View file

@ -1,8 +1,14 @@
import "./loadEnv";
import { connect } from "../data/db";
import path from "path";
import { setIsAPI } from "../globals";
require("dotenv").config({ path: path.resolve(process.cwd(), "api.env") });
if (!process.env.KEY) {
// tslint:disable-next-line:no-console
console.error("Project root .env with KEY is required!");
process.exit(1);
}
function errorHandler(err) {
console.error(err.stack || err); // tslint:disable-line:no-console