diff --git a/server/server.js b/server/server.js index f23a97f227..ca3caed7cf 100644 --- a/server/server.js +++ b/server/server.js @@ -10,11 +10,17 @@ const server = http.createServer(app); const port = parseInt(process.env.PORT ?? "3000", 10); //GET ALL VIDEOS +<<<<<<< HEAD app.get("/api/videos", (request, response) => { console.log("api videos"); db.query("SELECT * FROM videos") .then((result) => { console.log(result); +======= +app.get("/videos", (request, response) => { + db.query("SELECT * FROM videos") + .then((result) => { +>>>>>>> 829ab2169a5e0d64ed49f70286289d65be659d21 response.status(200).json({ videos: result.rows }); }) .catch((err) => { @@ -22,6 +28,10 @@ app.get("/api/videos", (request, response) => { }); }); +<<<<<<< HEAD +======= + +>>>>>>> 829ab2169a5e0d64ed49f70286289d65be659d21 server.on("listening", () => { const addr = server.address(); const bind = typeof addr === "string" ? `pipe ${addr}` : `port ${addr.port}`;