---
lang: en
title: 'API docs: rest.restserver.static'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/rest
permalink: /doc/en/lb4/apidocs.rest.restserver.static.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/rest](./rest.md) &gt; [RestServer](./rest.restserver.md) &gt; [static](./rest.restserver.static.md)

## RestServer.static() method

Mount static assets to the REST server. See https://expressjs.com/en/4x/api.html\#express.static

<b>Signature:</b>

```typescript
static(path: PathParams, rootDir: string, options?: ServeStaticOptions): void;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  path | PathParams | The path(s) to serve the asset. See examples at https://expressjs.com/en/4x/api.html\#path-examples |
|  rootDir | string | The root directory from which to serve static assets |
|  options | ServeStaticOptions | Options for serve-static |

<b>Returns:</b>

void


