mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Encrypt message data at rest
This commit is contained in:
parent
3f3d6af4ed
commit
baa3a5640e
10 changed files with 121 additions and 3 deletions
|
@ -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
|
||||
|
|
4
backend/src/api/loadEnv.ts
Normal file
4
backend/src/api/loadEnv.ts
Normal 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") });
|
Loading…
Add table
Add a link
Reference in a new issue