You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@thunderwin can you share where 'public' folder located in your project structure?
app.use('/static', express.static(path.join(__dirname, 'public'))) try to find 'public' in config/public
if your 'public' folder located in root folder of your project use
app.use('/static', express.static(path.join(__dirname, '/../public')));
__dirname - The directory name of the current module, so it path to directory where located file you add __dirname
The path.join() method joins all given path segments together using the platform-specific separator as a delimiter, then normalizes the resulting path.
app.use("/static", express.static(path.join(__dirname, "public")));
How to server static files?
I did some wrong?
I put it on config/express.js
The text was updated successfully, but these errors were encountered: