Answers for "what is express.static"

1

app.use public

app.use(express.static('public'))
app.use(express.static('files'))
Posted by: Guest on April-02-2020
2

use static with expres

app.use(express.static('directoryName'))
#store the files in the directory as if you were making a website without express
Posted by: Guest on August-12-2020
0

express.static

app.use('/static', express.static('public'))
Posted by: Guest on October-12-2021
0

what is express static

The express. static() function is a built-in middleware function in Express. It serves static files and is based on serve-static. Syntax: express.static(root, [options]) Parameters: The root parameter describes the root directory from which to serve static assets
Posted by: Guest on August-28-2021

Code answers related to "what is express.static"

Browse Popular Code Answers by Language