mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-16 03:10:31 +01:00
19 lines
374 B
JavaScript
19 lines
374 B
JavaScript
|
process.env.NODE_ENV === "development"
|
||
|
? require("dotenv").config({ path: `.env.${process.env.NODE_ENV}` })
|
||
|
: require("dotenv").config();
|
||
|
|
||
|
function reqBody(request) {
|
||
|
return typeof request.body === "string"
|
||
|
? JSON.parse(request.body)
|
||
|
: request.body;
|
||
|
}
|
||
|
|
||
|
function queryParams(request) {
|
||
|
return request.query;
|
||
|
}
|
||
|
|
||
|
module.exports = {
|
||
|
reqBody,
|
||
|
queryParams,
|
||
|
};
|