Join the AI Workshop and learn to build real-world apps with AI. A hands-on, practical program to level up your skills.
It’s common to have images, CSS and more in a public subfolder, and expose them to the root level:
const express = require('express')
const app = express()
app.use(express.static('public'))
/* ... */
app.listen(3000, () => console.log('Server ready'))
If you have an index.html file in public/, it will be served when you request the root URL (http://localhost:3000).