drift Docs
Start
What is Drift?
The tour, if you are new here.
Use cases
Whether Drift does your thing.
Getting started
Nothing to deployed, in one command.
Architecture
How a slice is put together.
What it costs
The free grant, four unit prices, two rules.
Build
Canvas
Static sites, same origin as your API.
Tools
Operate
Auth
Accounts, tokens and scopes.
Security
Boundaries, sandboxing and hardening.
Troubleshooting
Error codes
What went wrong, and what to do about it.
Legal
Acceptable use
What a slice may not be used for.
Data processing
The DPA, and every sub-processor.

Canvas sites

The canvas section lists the sites to publish. A bare path mounts a directory at /; the long form sets an explicit path for a sub-path (handy for a public site plus an admin or reviewer area). How much storage the slice has for them is set in the slice's shape.

TypeDefaultMeaning
  • sites[]
    Type
    path | map
    Default
    none
    Meaning
    A bare path mounts at /. Long form { dir, path } mounts dir at path.
Driftfile
canvas:
    sites:
      - ./canvas/public                # mounted at /
      - dir: ./canvas/reviewer
        path: /reviewer               # mounted at /reviewer

route is the old spelling of path.

It still parses and is rewritten for you, so an existing Driftfile keeps applying unchanged.

A site the file does not list is left serving and named in the report apply prints at the end of a run. Nothing prunes it — and no drift verb removes a site today, which the report says rather than offering a command that does not exist.

Read the Canvas guide →