DaronSchmit / DinnerAndAMovie

A fullstack project brought to you by my teammates and I
MIT License
0 stars 2 forks source link

Postman GET http://localhost:8080/api/movie/All request Failing - Code to fix required in routes/index.js #47

Closed Kay0s closed 3 years ago

Kay0s commented 3 years ago

added code to routes/index.js to fix GET http://localhost:8080/api/movie/All request on Postman

let express = require("express"); let router = express.Router();

router.use("/api/movie", require("./apiRoutes/movie-routes"));

image

// let router = require("express").Router(); // router.use("/api/dinner", require("./apiRoutes/dinner-routes")); // router.use("/api/movie", require("./apiRoutes/movie-routes")); // router.use("/", require("./htmlRoutes/html-routes")); let express = require("express"); let router = express.Router();

router.use("/api/movie", require("./apiRoutes/movie-routes"));

// =============================================================

// let path = require("path");

// Routes // =============================================================

// Each of the below routes just handles the HTML page that the user gets sent to.

// index route loads view.html router.get("/", (req, res, next) => { res.render("index"); });

// favorites route loads favorites.html router.get("/favorites", function (req, res, next) { res.render("favorites"); });

module.exports = router;