aboutsummaryrefslogtreecommitdiff
path: root/interface/routes/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'interface/routes/index.js')
-rw-r--r--interface/routes/index.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/interface/routes/index.js b/interface/routes/index.js
index 17c2021..057e1df 100644
--- a/interface/routes/index.js
+++ b/interface/routes/index.js
@@ -1,14 +1,18 @@
const express = require("express");
const router = express.Router();
const citizensController = require("../controllers/citizens.controller");
+const api = require('./api');
-// Setup Hello World route
+// Setup api routes
+router.use('/api', api);
+
+// Setup main route
router.get("/", (req, res) => {
// Get the citizens from the database
citizensController.findXCitizens().then(citizens => {
res.render("index", {
citizens: citizens,
- title: "Hello World"
+ title: "Home"
});
});
});