From 0effd769d2db83b9520356f2f3fd3810985e90c2 Mon Sep 17 00:00:00 2001 From: tycrek Date: Mon, 5 Apr 2021 20:01:10 -0600 Subject: [PATCH] added domain stuff a.k.a. goddamit I'm dumb --- .env.example | 3 ++- ass.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index f4b02aa..366266c 100644 --- a/.env.example +++ b/.env.example @@ -1 +1,2 @@ -PORT=40115 \ No newline at end of file +PORT=40115 +DOMAIN=localhost \ No newline at end of file diff --git a/ass.js b/ass.js index 507ce96..a945f63 100644 --- a/ass.js +++ b/ass.js @@ -57,7 +57,7 @@ function startup() { data[resourceId] = req.file; saveData(data); - res.type('json').send({ resource: `http://lh:${process.env.PORT}/${resourceId}`, delete: `http://lh:${process.env.PORT}/delete/${req.file.filename}` }); + res.type('json').send({ resource: `http://${process.env.DOMAIN}:${process.env.PORT}/${resourceId}`, delete: `http://${process.env.DOMAIN}:${process.env.PORT}/delete/${req.file.filename}` }); }); // View file