我尝试将我的文件保存在一个特定的路径中,同时也保存在mongodb中,这里我使用的是route.js中的中间件uploadImg,但是but和Error: Route.post() requires acallback function but got a [objectObject] var router = require("expres
我正在学习API基础知识的教程,每当我运行我的项目时,我都会得到错误Error: Route.post() requires a callback function but got a [object/controllers/todoListController'); .get(todoList.list_all_tasks).post(todoList.creat
/app/controllers/genericController'); app.get('/listdocEven if i comment whole body of this exports.listDoc, then also i get the same error. just assume here500
我正在使用Express构建Node API,但使用JSON文件作为持久数据。在构建我的路由的过程中,我得到了一个错误:Route.post() requires a callback function but got a [object Undefined]我想要创建一个新产品,并通过我的中间件进行验证,如下所示:const express = require("express");
// Router