Removed env stuff from API

This commit is contained in:
TheEssem 2020-09-02 22:52:01 -05:00
parent a6137436d2
commit 8b346240e9
2 changed files with 3 additions and 3 deletions

View file

@ -14,12 +14,12 @@ const storage = multer.diskStorage({
}); });
const upload = multer({ storage: storage }); const upload = multer({ storage: storage });
const app = express(); const app = express();
const port = process.env.API_PORT || 3000; const port = 3000;
const formats = ["image/jpeg", "image/png", "image/webp", "image/gif"]; const formats = ["image/jpeg", "image/png", "image/webp", "image/gif"];
app.get("/", (req, res) => { app.get("/", (req, res) => {
res.send(`esmBot v${version}${process.env.NODE_ENV === "development" ? "-dev" : ""}`); res.send(`esmBot v${version}`);
}); });
app.post("/:method", upload.single("image"), async (req, res, next) => { app.post("/:method", upload.single("image"), async (req, res, next) => {

View file

@ -12,7 +12,7 @@
"/usr/lib/glib-2.0/include" "/usr/lib/glib-2.0/include"
], ],
"libraries": [ "libraries": [
"<!(pkg-config --libs Magick++ zxing)ZXing", "<!(pkg-config --libs Magick++ zxing)",
], ],
"defines": ["NAPI_DISABLE_CPP_EXCEPTIONS"] "defines": ["NAPI_DISABLE_CPP_EXCEPTIONS"]
} }