problem description the front end requests the picture in the node.js server. After getting the src path, the img image cannot be displayed properly, and the network cannot display normally. the environmental background of the problems and what m...
problem description use mongoose to manipulate data in MongoDB Atlas when adding data, if I use res.json (data) to try to refresh the data on the page, only one data in json format will be displayed on the page but when I delete the data, if I do ...
< H2 > I believe that many people will have the same needs as me < H2 > the directory is as follows Project node_modules package.json subproject node_modules package.json I cd to the first-level directory of the project then npm insta...
uses express as the server-side framework, and then uses redis to store some data. I found a problem, but I couldn t figure it out. for example, A sends an ajax request at time 2 redis 31v 11v 00, this request modifies some data in redis, and B sen...
Connect to the database in the framework automatically generated by express connect.js Code const mysql = require( mysql ); const db = mysql.createConnection({ host: localhost , port: 3306, user: root , database: ningxia }) d...
app.use(" login", function (req, res, next) { console.log(req.url) next() }) app.get(" login", function (req, res, next) { console.log(req.url) }) enter http: 127.0.0.1:3000 login why the result is login Why is ...
I want to write an interface to update user information, UPDATE user_information SET the parameters here are not fixed where uid =? could be name=? or name=?, sex=? or name=?, sex=?, qq=? Please how should I achieve it? app.all(" inf...
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...
problem description recently, middleware (body-parser) in express suddenly fails, req.body can not get any value , req.query can get the value . It was useful to add body-parser middleware at first, until yesterday when token was added, body-p...
problem description request a third-party interface, and use node, express and http-proxy-middleware to build a server to forward the request. the front end sends the request using fetch. Some interfaces are accessible, while others are still prompte...
when node.js connects to mongodb and executes MongoClient.connect (), it is very fast in the local environment, but very slow to get online, which takes more than 1 second, as shown below: var express = require( express ); var router = express.Router...
router.get( ,function (req,res,next) { res.render( index ); }) router.get( a ,function (req,res,next) { axios }) the first route is a path request to render index.html in index.html, and request a to node after html gets some val...
I don t have much time to contact nodejs. I use nodejs to write the server. Now I write all the interfaces in one file. How to write these interfaces separately in different files, and finally introduce all the interface files into a main file all my...
after entering the configuration discovery, you can run express as the middleware of nuxt, that is, configure serverMiddleware. Start the project with nuxt itself; can also run nuxt as middleware for express, that is, add next.render to the express ent...
the project can be started normally using webpack s devServer. After configuring ssr, css @ import reported an error express configuration import @babel polyfill import React from react ; import {renderToString} from react-dom server ; imp...
problem description deploy vue isomorphic projects in a production environment, using express at the back end. After the deployment, it was found that the vendor.js size of the vue was very large, and the open code found that "there was no compressio...
problem description react uses create-react-app to build the environment node intends to use the Express framework Q: want to know how to structure the project if you use node to develop the backend? Q: do you want to open two services if you run ...
I use the dist folder generated by vue, and a server created by myself is OK var express = require( express ); var app = express(); app.use(express.static( . dist )); module.exports = app.listen( 90 , (err) => { if (err) { console.log...
I just started to learn express recently. In the practice of tapping mdn, I want to modify it a little bit. If I encounter a problem, I will first add the code: tagController.js: const Tag = require( .. models tag ); exports.find_all = async (req,...
A novice learning vue+nuxt; encounters a problem and is confused for a long time. When refreshing the page, the vuex state security problem in nuxt; problem 1, cooperate with the plug-in vuex-persistedstate for localization, but in store index.js, sett...