routes/indexRouter.js

/**
 * Router entry point for the root index, sets up all "/" starting point
 * @namespace IndexRouter
 * @memberof Routers
 */

// initialize router
const express = require('express')
const router = express.Router()

// include the controller that handles the logic for the "/" routes
const indexController = require('../controllers/indexController.js')

// for each route point to the controller function to handle the logic for that specific route
router.get('/', indexController.index)

// export the router here so we can access it in routes/index.js
module.exports = router