aboutsummaryrefslogtreecommitdiff
path: root/src/server/index.ts
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2020-01-04 00:54:08 -0800
committerSam Wilkins <samwilkins333@gmail.com>2020-01-04 00:54:08 -0800
commit9a3df8031b55a16ad55cef6975ff8bf4f681f14e (patch)
treede231fcb6ba4b591fd08cffadc798ea36312bcc0 /src/server/index.ts
parentb31d54b285236dc92f7d287af6a441878f429a34 (diff)
config now not read by both parents and children, env used to pass from master to worker
Diffstat (limited to 'src/server/index.ts')
-rw-r--r--src/server/index.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/server/index.ts b/src/server/index.ts
index 88bab7dea..381496c20 100644
--- a/src/server/index.ts
+++ b/src/server/index.ts
@@ -24,7 +24,6 @@ import GooglePhotosManager from "./ApiManagers/GooglePhotosManager";
import { Logger } from "./ProcessFactory";
import { yellow } from "colors";
import { Session } from "./Session/session";
-import { Utils } from "../Utils";
export const publicDirectory = path.resolve(__dirname, "public");
export const filesDirectory = path.resolve(publicDirectory, "files");
@@ -35,7 +34,6 @@ export const filesDirectory = path.resolve(publicDirectory, "files");
* before clients can access the server should be run or awaited here.
*/
async function preliminaryFunctions() {
- await Session.distributeKey();
await Logger.initialize();
await GoogleCredentialsLoader.loadCredentials();
GoogleApiServerUtils.processProjectCredentials();
@@ -92,8 +90,8 @@ function routeSetter({ isRelease, addSupervisedRoute, logRegistrationOutcome }:
method: Method.GET,
subscription: new RouteSubscriber("kill").add("password"),
secureHandler: ({ req, res }) => {
- if (req.params.password === Session.key) {
- process.send!({ action: yellow("kill") });
+ if (req.params.password === process.env.session_key) {
+ process.send!({ action: { message: "kill" } });
res.send("Server successfully killed.");
} else {
res.redirect("/home");