Beginners encounter problems with express when learning node.js
怪我咯
怪我咯 2017-05-16 13:42:20
0
2
364
//index.js
var express=require('express');
var app=express();
app.get('/',function(req,res){
    res.send('hello express');
});
app.get('/user/:name',function(req,res){
    res.send('hello '+req.params.name);
});
app.listen(3000);

Why does the page display 'Cannot GET /users/fabrice' when accessing 'localhost:3000/users/fabrice'
Please let me know, thanks ~~

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(2)
大家讲道理

You wrote an extra s

阿神

Your route is configured with user, but the access is users←_←

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!