CNode

express-controller嵌套目录使用,路由访问返回404

问答
Bbaiping01发布于9 年前最后回复9 年前6 回复2673 浏览0 收藏

在使用express-controller时,在controller目录下直接创建的UserController.js在访问是http://localhost:3000/user/login是没有问题的 但是在controller目录下创建了home目录,然后将UserController.js复制到home目录,访问是http://localhost:3000/home/user/login,返回404

查看回复

回复 (6)

P
parrot-bot#1·9 年前

前排水果瓜子

M
MrhaoXianSheng#2·9 年前

123456

M
MrhaoXianSheng#3·9 年前

123

M
MrhaoXianSheng#4·9 年前

1234567

M
MrhaoXianSheng#5·9 年前

321

L
linkenliu#6·9 年前

controller与route分不清?controller目录改了跟你route有啥关系?

参与回复
登录后即可参与回复。登录