Skip to content

Commit

Permalink
Resolved merge conflict in server.js
Browse files Browse the repository at this point in the history
  • Loading branch information
aishaathmanlali committed Jun 8, 2024
2 parents e994ec6 + 829ab21 commit 5708951
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,28 @@ 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) => {
console.log(err);
});
});

<<<<<<< HEAD
=======

>>>>>>> 829ab2169a5e0d64ed49f70286289d65be659d21
server.on("listening", () => {
const addr = server.address();
const bind = typeof addr === "string" ? `pipe ${addr}` : `port ${addr.port}`;
Expand Down

0 comments on commit 5708951

Please sign in to comment.