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

404 Not Found #2

Open
0x0480 opened this issue Jun 29, 2019 · 1 comment
Open

404 Not Found #2

0x0480 opened this issue Jun 29, 2019 · 1 comment

Comments

@0x0480
Copy link

0x0480 commented Jun 29, 2019

Not Found
404
NotFoundError: Not Found
Why it gives error>?

@lovelifeloveyou
Copy link

报404错误是因为你路由并没有定义根路由下做什么处理,你可以在app.js文件下做相应处理
app.get('/', (req, res, next) => { console.log('欢迎来到德莱联盟') res.writeHead(200,{'Content-Type':'html'}); res.write('<!DOCTYPE html>'+ '<html>'+ '<head>'+ '<meta charset="utf-8" />'+ '<title>LOL</title>'+ '</head>'+ '<body>欢迎来到德莱联盟</body>'+ '</html>'); res.end(); })

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