Hi, I’m stuck on the serving a static asset challenge.
A middleware needs to be mounted using the method app.use(path, middlewareFunction). The first path argument is optional. If you don’t pass it, the middleware will be executed for all the requests.
Mount the express.static() middleware for all the requests with app.use(). The absolute path to the assets folder is __dirname + /public.
This is my code below.
app.use(express.static(__dirname + "/public"));
Any help is appreciated!