Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

链接咨询 #5

Open
subhacker opened this issue Aug 7, 2017 · 1 comment
Open

链接咨询 #5

subhacker opened this issue Aug 7, 2017 · 1 comment

Comments

@subhacker
Copy link

HI 我也在寻找react与express之间的配合。刚看了你的代码,有点疑问:
1)当请求的是主页的时候,app.js中app.use('/', routes);是如何自动跳转到public中的index.html文件的?
2)app.use('/', routes);中的routes中定义的是res.render('index', { title: 'Express' });,但是该行并没有执行,是什么原因来着?

@cqupt-yifanwu
Copy link
Owner

路由 / 会自己去找index

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants