Serving static files Flashcards

1
Q

Which middleware is used to parse static files?

A

app.use(express.static(‘absolute_folder_path_containing_all_the_static_files’))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you serve a static file to the client?

A

res.sendFile(‘absolute_file_path’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly