3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-21 16:55:03 +00:00

Encrypt message data at rest

This commit is contained in:
Dragory 2020-09-16 22:32:43 +03:00
parent cf13a5e32b
commit 5f28d3513e
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

View file

@ -0,0 +1,4 @@
import path from "path";
require("dotenv").config({ path: path.resolve(process.cwd(), "../.env") });
require("dotenv").config({ path: path.resolve(process.cwd(), "api.env") });