can multiple interfaces be requested in an express route and then output to the page together
can multiple interfaces be requested in an express route and then output to the page together
Yes:
learn to read the documents. Oh,
/
app.route('/book')
.get(function(req, res) {
res.send('Get a random book');
})
.post(function(req, res) {
res.send('Add a book');
})
.put(function(req, res) {
res.send('Update the book');
});
see the express document: ide/routing.html" rel=" nofollow noreferrer "> http://www.expressjs.com.cn/g.
Express simple blog do a simple blog site with the above tutorials, but when you link to the MongoDB database, you will find a problem. Using webStrom will not report an error, while vsCode debugging will not report the following error: * excepti...
Front end code <li class="block">: <img :src="productImg" alt="real-photo" v-if="productImg"> <input type="file" ref="proupload" name="file"...
<!doctype html> <html lang="en"> <head> <title>Document< title> < head> <body> <%= helloWorld %> <img src=". a.jpg" alt="" > < body> < html> var ...
Terminal error: Path must be a string. Received null it feels like a problem with _ _ dirname, but I still reported an error after I changed it to the relative path. I would like to ask the great god to guide the rookies who have just learned node....
express project, and then if there is anything wrong, it will cause the whole project card to fall off. How to deploy pm2 to the server? I have tried to test on this machine. The same error running the project using pm2 will not make the whole project ca...
The code is as follows: app.use (express.static (path.join (_ _ dirname, public )), {maxAge:31536000000})); Why is invalid ...
Why can t vs code debug console output objects be expanded? Ask the boss to tell the mac platform ...
Front end: : ...
const express = require( express ) const router = express.Router() const Student = require( .. students ) router.param([ id , page ], function (req, res, next, value) { console.log( 11 , value); next(); }) router.get( user :id :p...
A front-end dog, use vue+express to do a blog, and then rent a minimum configuration Tencent Cloud (centos system) I want to deploy vue and express projects on the cloud. At present, I only know how to install node and nginx environment first, but where...
express uses post to request an error and cannot be accessed. The Chrome console shows that the request method requesting the file is get,. How should I solve this problem? ...
I now need to pass a string of special length to the background server, as shown in figure {"c":1549473758948,"e":253402300799000,"v":"[{ "id ":1, "fileName ": "2016_Book_PsychometricFram...