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’))
2
Q
How do you serve a static file to the client?
A
res.sendFile(‘absolute_file_path’)