ExpressJs — Serving Static Files
Express makes it easy to serve static files like HTML, CSS, and images by using the built-in express.static middleware.
app.use(express.static('public'));
// Access files via http://localhost:3000/filename
Express makes it easy to serve static files like HTML, CSS, and images by using the built-in express.static middleware.
app.use(express.static('public'));
// Access files via http://localhost:3000/filename