Tuesday, 26 November 2019

Problem with the routing any ideas?

controller ------------------------------------function indexController() {function getIndex(req, res) {res.render('index', {title: 'CV'})}}module.exports = indexController;route ---------------------------------------------const express = require('express');const router = express.Router();const indexController = require('../controllers/index-Controller.js');router.get('/', indexController.getIndex);module.exports = router;-----------------------------------------------------------The error i get is : Error: Route.get() requires a callback function but got a [object Undefined]

Submitted November 26, 2019 at 05:28PM by draganov11

No comments:

Post a Comment