Documentation chapters
You're looking at legacy documentation.
New multi-language documentation available at

Public directory

The FrameworkModule provides a way to serve static files like images, PDFs, binary files, etc. The configuration option publicDir allows you to specify which folder should be used as default entry point for requests that don't lead to a HTTP controller route. Per default this behavior is disabled (empty value).

To enable serving public files set publicDir to a folder you want. Usually you would pick a name like publicDir to make things obvious.

├── app.ts
└── publicDir
    └── logo.jpg

To change the publicDir you can alter the first argument of FrameworkModule.

import { App } from '@deepkit/app';
import { FrameworkModule } from '@deepkit/framework';

// your config and http controller here 

new App({
    config: config,
    controllers: [MyWebsite],
    imports: [
        new FrameworkModule({
            publicDir: 'publicDir'

All files inside that configured folder are now accessible via HTTP. For example could you now open http://localhost:8080/logo.jpg and you see the image logo.jpg put in publicDir.

Made in Germany