# Serving Static Assets with Express

> Learn how to serve static assets like images and CSS in Express with the express.static() middleware, exposing a public folder at the root URL of your app.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2018-08-31 | Topics: [Express.js](https://flaviocopes.com/tags/express/) | Canonical: https://flaviocopes.com/express-static-assets/

It's common to have images, CSS and more in a `public` subfolder, and expose them to the root level:

```js
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/`, that will be served if you now hit the root domain URL (`http://localhost:3000`)
