GSUS
GSUS
KPCKevin Powell - Community
Created by GSUS on 1/30/2024 in #back-end
need help with hosting a simple website
Yea that's what I ended up doing, using render instead of netlify
7 replies
KPCKevin Powell - Community
Created by GSUS on 1/30/2024 in #back-end
need help with hosting a simple website
app.get("/course/:id", (req, res) => {
const courseName = req.params.id;
const course = courseData.find((course) => course.course == courseName);
if (!course) {
res.status(404).json("course not found");

res.render("course", { course });
});
app.get("/course/:id", (req, res) => {
const courseName = req.params.id;
const course = courseData.find((course) => course.course == courseName);
if (!course) {
res.status(404).json("course not found");

res.render("course", { course });
});
here is the complete endpoint
7 replies