Navigation

Hosting (Beta)

Introduction

Stitch Hosting allows you to host, manage, and serve your application’s static media and document files. You can use Hosting to store individual pieces of content or to upload and serve your entire client application.

To get started, enable hosting for your application then start uploading content.

Concepts

Static Content

A file is static if you can serve it directly to clients without requiring additional processing or logic to generate it. Static content includes document files, such as HTML, JavaScript, and CSS, as well as media files like images, audio, and videos.

Hosting Domain

Stitch hosts your application’s content behind a unique domain name. By default, Stitch uses domains of the following form:

<Your App ID>.mongodbstitch.com

Note

You can configure Stitch to host content at a custom domain name that you own in addition to the default hosting domain.

Resource Paths

A resource path is a string that uniquely identifies an uploaded file based on its position in the file tree. You can access a hosted file through a unique URL that consists of your application’s hosting domain followed by the file’s resource path.

For example, a PNG image of a company’s logo hosted in a directory named images would have the resource path /images/logo.png. You could access this image at a URL similar to the following:

myapp-abcde.mongodbstitch.com/images/logo.png

Usage Guides

Guide Description
Enable Hosting Learn how to enable static file hosting for your Stitch application.
Upload Content to Stitch Learn how to add and update files in Stitch Hosting.
Configure File Metadata Learn how to add descriptive metadata attributes to a file.
Flush the CDN Cache Learn how to force CDN servers to refresh their cached copies of your application’s hosted files.
Use a Custom Domain Name Learn how to serve hosted content from a domain name that you own.
Use a Custom 404 Page Learn how to show a custom 404 page when users request a resource that does not exist.

Reference Documentation

Subject Description
File Metadata Attributes Includes definitions and examples for all file metadata attributes.