I want to give back an answer form the backend to the frontend whenever "Hallo" is given as an input form the frontend, if the input is not "Hallo" nothing should be given back
import { opine } from "https://deno.land/x/opine@2.1.1/mod.ts";
import { opineCors } from "https://deno.land/x/cors/mod.ts";
const app = opine();
app.use(opineCors())
app.get("/gibmirdieloesung", function (req, res) {
console.log(require("Hallo").inspect(req.params))
res.send({ answer: "This is an example" });
});
app.listen(
3004,
() => console.log("server has started on http://localhost:3004 "),
);
Is the usage of require() correct? If not, do you have any suggestions?
Thank U