changes testing env
This commit is contained in:
parent
44be33e92c
commit
cb4b9a0764
5
app.js
5
app.js
|
|
@ -8,7 +8,10 @@ const server = http.createServer((req, res) => {
|
|||
if (req.method === "GET" && parsedUrl.pathname === "/") {
|
||||
const key = parsedUrl.searchParams.get("key");
|
||||
const response = key
|
||||
? { message: "added to the response", value: process.env.Test }
|
||||
? {
|
||||
message: "added to the response",
|
||||
value: process.env[key] ?? "env not found",
|
||||
}
|
||||
: { message: "key query param not found" };
|
||||
|
||||
res.writeHead(200, { "Content-Type": "application/json" });
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user