Node configuration static resource middleware

app.use('/node_modules',express.static(path.join(__dirname,'/node_modules'))

After app.jsthe code is configured in, you can node_modulesaccess the /node_modulesdirectory anywhere in the project without adding the full path.

Guess you like

Origin blog.csdn.net/KaiSarH/article/details/108524894