diff --git a/Example-1/controller/tutorial.controller.js b/Example-1/controllers/tutorial.controller.js similarity index 100% rename from Example-1/controller/tutorial.controller.js rename to Example-1/controllers/tutorial.controller.js diff --git a/Example-1/server.js b/Example-1/server.js index fd348af..2bdd6e5 100644 --- a/Example-1/server.js +++ b/Example-1/server.js @@ -3,7 +3,7 @@ const cors = require("cors"); const app = express(); -const db = require("./app/models"); +const db = require("./models/index"); // db.sequelize.sync(); db.sequelize.sync({ force: true }).then(() => { console.log("Drop and re-sync db."); @@ -26,6 +26,8 @@ app.get("/", (req, res) => { res.json({ message: "Hello World!" }); }); +require("./routes/tutorial.routes")(app); + // set port, listen for requests const PORT = process.env.PORT || 8080; app.listen(PORT, () => {